@php $shouldOpenCreateModal = $errors->any() && old('_child_form') === 'create'; $shouldOpenEditModal = $errors->any() && old('_child_form') === 'edit'; @endphp

Our Children

@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif

Manage children profiles shown on the public website.

@if ($search === '')

Drag the handle to change the display order.

@else

Clear search to reorder children by drag and drop.

@endif
@if (auth()->user()?->canAccessRoute('our-children.store')) @endif
@if ($search !== '') Clear @endif
@forelse ($children as $listChild) @empty @endforelse
Photo Name Age Gender Grade Status Actions
@if ($search === '' && auth()->user()?->canAccessRoute('our-children.reorder')) @endif @if ($listChild->image_url) {{ $listChild->fullname }} @else N/A @endif {{ $listChild->fullname }} {{ $listChild->age }} {{ $listChild->gender }} {{ $listChild->current_grade ?: '—' }} @if (auth()->user()?->canAccessRoute('our-children.toggle-status')) @else {{ $listChild->status === 'publish' ? 'Publish' : 'Unpublish' }} @endif @if (auth()->user()?->canAccessRoute('our-children.update')) @endif @if (auth()->user()?->canAccessRoute('our-children.destroy'))
@csrf @method('DELETE')
@endif
No children found.
{{-- Create modal --}}

Add Child

Status will be Publish by default.

@csrf @include('backend.our-children.partials.form', [ 'idPrefix' => 'create_child', 'child' => null, 'useOldOnError' => $shouldOpenCreateModal, 'bindAlpineEdit' => false, 'previewMode' => 'create', ])
{{-- Edit modal --}}

Edit Child

Update child profile details.

@csrf @method('PUT') @include('backend.our-children.partials.form', [ 'idPrefix' => 'edit_child', 'child' => null, 'useOldOnError' => $shouldOpenEditModal, 'bindAlpineEdit' => false, 'previewMode' => 'edit', ])
@push('scripts') @endpush