{{-- Show the erros, if any --}} @if ($errors->any()) @endif {{-- Show the inputs --}}
@foreach ($fields as $field) @include('admin.panel.fields.' . $field['type'], ['field' => $field]) {{-- The fields 'newline' element can be: - true (boolean) for both of 'create' or 'update' forms - 'create' (string) for create form only - 'update' (string) for update form only --}} @if (array_key_exists('newline', $field)) @if (is_bool($field['newline']) && $field['newline'])
@endif @if (isset($form)) @if (is_string($field['newline']) && $field['newline'] == $form)
@endif @endif @endif @endforeach
{{-- Define blade stacks so css and js can be pushed from the fields to these sections. --}} @section('after_styles') @parent @stack('crud_fields_styles') @endsection @section('after_scripts') @parent @stack('crud_fields_scripts') @endsection