{{-- 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')
{{-- Switch --}} {{-- Label --}}
{{-- Label for the required * --}} {{-- 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') @bassetBlock('backpack/crud/fields/switch-field.js') @endBassetBlock @endpush @push('crud_fields_styles') @bassetBlock('backpack/crud/fields/switch-field.css') @endBassetBlock @endpush {{-- End of Extra CSS and JS --}} {{-- ########################################## --}}