File "create.blade.php"

Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/resources/views/admin/attributeOptions/create.blade.php
File size: 1.96 KB
MIME-type: text/plain
Charset: utf-8

@extends('layouts.admin')
@section('content')

<div class="card">
    <div class="card-header">
        {{ trans('global.create') }} {{ trans('cruds.attributeOption.title_singular') }}
    </div>

    <div class="card-body">
        <form method="POST" action="{{ route("admin.attribute-options.store") }}" enctype="multipart/form-data">
            @csrf
            <div class="form-group">
                <label class="required" for="attribute_id">{{ trans('cruds.attributeOption.fields.attribute') }}</label>
                <select class="form-control select2 {{ $errors->has('attribute') ? 'is-invalid' : '' }}" name="attribute_id" id="attribute_id" required>
                    @foreach($attributes as $id => $entry)
                        <option value="{{ $id }}" {{ old('attribute_id') == $id ? 'selected' : '' }}>{{ $entry }}</option>
                    @endforeach
                </select>
                @if($errors->has('attribute'))
                    <span class="text-danger">{{ $errors->first('attribute') }}</span>
                @endif
                <span class="help-block">{{ trans('cruds.attributeOption.fields.attribute_helper') }}</span>
            </div>
            <div class="form-group">
                <label class="required" for="name">{{ trans('cruds.attributeOption.fields.name') }}</label>
                <input class="form-control {{ $errors->has('name') ? 'is-invalid' : '' }}" type="text" name="name" id="name" value="{{ old('name', '') }}" required>
                @if($errors->has('name'))
                    <span class="text-danger">{{ $errors->first('name') }}</span>
                @endif
                <span class="help-block">{{ trans('cruds.attributeOption.fields.name_helper') }}</span>
            </div>
            <div class="form-group">
                <button class="btn btn-danger" type="submit">
                    {{ trans('global.save') }}
                </button>
            </div>
        </form>
    </div>
</div>



@endsection