@php $current_value = old($field['name']) ? old($field['name']) : (isset($field['value']) ? $field['value'] : (isset($field['default']) ? $field['default'] : '' )); $field['allows_null'] = $field['allows_null'] ?? $crud->model::isColumnNullable($field['name']); @endphp @include('crud::fields.inc.wrapper_start') @include('crud::fields.inc.translatable_icon') @php $related_model = $crud->getRelationModel($field['entity']); $group_by_model = (new $related_model)->{$field['group_by']}()->getRelated(); $categories = $group_by_model::with($field['group_by_relationship_back'])->get(); if (isset($field['model'])) { $categorylessEntries = $related_model::doesnthave($field['group_by'])->get(); } @endphp {{-- HINT --}} @if (isset($field['hint']))
{!! $field['hint'] !!}
@endif @include('crud::fields.inc.wrapper_end') {{-- ########################################## --}} {{-- 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 ($crud->fieldTypeNotLoaded($field)) @php $crud->markFieldTypeAsLoaded($field); @endphp {{-- FIELD CSS - will be loaded in the after_styles section --}} @push('crud_fields_styles') @endpush {{-- FIELD JS - will be loaded in the after_scripts section --}} @push('crud_fields_scripts') @if (app()->getLocale() !== 'en') @endif @endpush @endif {{-- End of Extra CSS and JS --}} {{-- ########################################## --}}