{{ html()->modelForm($page ?? null, 'POST', route('page.store'))->class('needs-validation')->attributes(['novalidate', 'enctype' => 'multipart/form-data'])->open() }} @if (isset($page)) {{ html()->hidden('id', $page->id) }} @endif
{{ html()->label('Title')->class('form-label')->for('title') }} {{ html()->span('*')->class('text-danger') }} {{ html()->text('title')->class('form-control')->placeholder('Enter Page Title')->required() }}
{{ html()->label('Type')->class('form-label')->for('type') }} {{ html()->span('*')->class('text-danger') }} {{ html()->select('type', config('constants.page_type_options'))->class('form-select choices-select')->required() }}
{{ html()->label('Page Content Options')->class('form-label') }}
@foreach (config('constants.page_section_options') as $value => $label)
{{ html()->checkbox('section[]', in_array($value, $page->section ?? []), $value)->class('form-check-input')->id("{$value}Check") }} {{ html()->label($label)->class('form-check-label mb-0 text-nowrap')->for("{$value}Check") }}
@endforeach
{{ html()->closeModelForm() }}