@include('crud::inc.field_translatable_icon')
@php
$entity_model = $crud->getRelationModel($field['entity'], - 1);
$group_by_model = (new $entity_model)->{$field['group_by']}()->getRelated();
$categories = $group_by_model::has($field['group_by_relationship_back'])->get();
if (isset($field['model'])) {
$categorylessEntries = $field['model']::has($field['group_by'], '=', 0)->get();
}
@endphp
{{-- 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 ($crud->checkIfFieldIsFirstOfItsType($field, $fields))
{{-- 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')
@endpush
@endif
{{-- End of Extra CSS and JS --}}
{{-- ########################################## --}}