{{-- switch field --}} @php $field['value'] = old_empty_or_null($field['name'], '') ?? ($field['value'] ?? ($field['default'] ?? '0')); $field['onLabel'] = $field['onLabel'] ?? ''; $field['offLabel'] = $field['offLabel'] ?? ''; $field['color'] = $field['color'] ?? 'primary'; @endphp {{-- Wrapper --}} @include('crud::fields.inc.wrapper_start') {{-- Translatable icon --}} @include('crud::fields.inc.translatable_icon')
{{-- Hint --}} @isset($field['hint'])

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

@endisset
@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 --}} {{-- FIELD JS - will be loaded in the after_scripts section --}} @push('crud_fields_scripts') @loadOnce('bpFieldInitSwitchScript') @endLoadOnce @endpush @push('crud_fields_styles') @loadOnce('bpFieldInitSwitchStyle') @endLoadOnce @endpush {{-- End of Extra CSS and JS --}} {{-- ########################################## --}}