<form class="row" method="post" action="{{ $actionRoute }}">
    @if(isset($edit) && $edit === true)
        @method('PUT')
    @endif
    @csrf()
    <div class="col-6">
        <div class="form-group">
            <label>
                Názov
                <span class="text-red">*</span>
            </label>
            <input class="form-control @if($errors->has('nazov')) is-invalid @endif" type="text" name="nazov" placeholder="názov kategórie" value="{{ $kategoria->nazov ?? old('nazov') }}" required autofocus>
            @if($errors->has('nazov'))
                @foreach($errors->get('nazov') as $message)
                <div class="invalid-feedback">{{ $message }}</div>
                @endforeach
            @endif
        </div>
    </div>
    <div class="col-6">
        <div class="form-group">
            <label>
                Obrázok
                <span class="text-red">*</span>
            </label>
            <input class="form-control @if($errors->has('obrazok')) is-invalid @endif" type="text" name="obrazok" placeholder="obrázok kategórie" value="{{ $kategoria->obrazok ?? old('obrazok') }}" required>
            @if($errors->has('obrazok'))
                @foreach($errors->get('obrazok') as $message)
                <div class="invalid-feedback">{{ $message }}</div>
                @endforeach
            @endif
        </div>
    </div>
    <div class="col-12">
        <div class="form-group">
            <button class="btn btn-primary" type="submit">
                <i class="fa fa-save"></i>
                Uložiť
            </button>
        </div>
    </div>
</form>
