{{-- select2 from ajax --}} @php $field ??= []; $entityModel = !empty($xPanel) ? $xPanel->model : null; $connectedEntity = new $field['model']; $connectedEntityKeyName = $connectedEntity->getKeyName(); $oldValue = $field['value'] ?? ($field['default'] ?? false); $oldValue = old($field['name'], $oldValue); @endphp
@include('admin.panel.fields.inc.translatable_icon') {{-- HINT --}} @if (isset($field['hint']))
{!! $field['hint'] !!}
@endif
{{-- ########################################## --}} {{-- Extra CSS and JS for this particular field --}} {{-- If a field type is shown multiple times on a form, the CSS and JS will only be loaded once --}} @if ($xPanel->checkIfFieldIsFirstOfItsType($field, $fields)) {{-- FIELD CSS - will be loaded in the after_styles section --}} @push('crud_fields_styles') {{-- include select2 css--}} @endpush {{-- FIELD JS - will be loaded in the after_scripts section --}} @push('crud_fields_scripts') {{-- include select2 js--}} @endpush @endif {{-- include field specific select2 js--}} @push('crud_fields_scripts') @endpush {{-- End of Extra CSS and JS --}} {{-- ########################################## --}}