{{ $pageTitle ?? trans('messages.list') }}
@if($auth_user->can('category list')) {{ __('messages.back') }} @endif
{{ Form::model($subcategory,['method' => 'POST','route'=>'subcategory.store', 'enctype'=>'multipart/form-data', 'data-toggle'=>"validator" ,'id'=>'subcategory'] ) }} {{ Form::hidden('id') }}
{{ Form::label('name',trans('messages.name').' *',['class'=>'form-control-label'], false ) }} {{ Form::text('name',old('name'),['placeholder' => trans('messages.name'),'class' =>'form-control','required']) }}
{{ Form::label('name', __('messages.select_name',[ 'select' => __('messages.category') ]).' *',['class'=>'form-control-label'],false) }}
{{ Form::select('category_id', [optional($subcategory->category)->id => optional($subcategory->category)->name], optional($subcategory->category)->id, [ 'class' => 'select2js form-group category', 'required', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.category') ]), 'data-ajax--url' => route('ajax-list', ['type' => 'category']), ]) }}
{{ Form::label('status',trans('messages.status').' *',['class'=>'form-control-label'],false) }} {{ Form::select('status',['1' => __('messages.active') , '0' => __('messages.inactive') ],old('status'),[ 'id' => 'role' ,'class' =>'form-control select2js','required']) }}
@if($subcategory && getMediaFileExit($subcategory, 'subcategory_image')) @else @endif
@if(getMediaFileExit($subcategory, 'subcategory_image'))
@php $extention = imageExtention(getSingleMedia($subcategory,'subcategory_image')); @endphp #
@endif
{{ Form::label('description',trans('messages.description'), ['class' => 'form-control-label']) }} {{ Form::textarea('description', null, ['class'=>"form-control textarea" , 'rows'=>3 , 'placeholder'=> __('messages.description') ]) }}
{{ Form::checkbox('is_featured', $subcategory->is_featured, null, ['class' => 'custom-control-input' , 'id' => 'is_featured' ]) }}
{{ Form::submit( trans('messages.save'), ['class'=>'btn btn-md btn-primary float-right']) }} {{ Form::close() }}