@php $current_value = old($field['name']) ?? ($field['value'] ?? ($field['default'] ?? '')); //if it's part of a relationship here we have the full related model, we want the key. if (is_object($current_value) && is_subclass_of(get_class($current_value), 'Illuminate\Database\Eloquent\Model')) { $current_value = $current_value->teams; } if (!isset($field['options'])) { $options = [ 'private' => [ [ 'user_id' => backpack_user()->id, 'label' => backpack_user()->name, 'disabled' => true, ], ], 'public' => [null], ]; } else { $options = $field['options']; } $field['allows_null'] = $field['allows_null'] ?? $crud->model::isColumnNullable($field['name']); @endphp @include('crud::fields.inc.wrapper_start') @include('crud::fields.inc.translatable_icon') {{-- HINT --}} @if (isset($field['hint']))

{!! $field['hint'] !!}

@endif @include('crud::fields.inc.wrapper_end') @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