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

Photo Gallery

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

Manage photo galleries shown on the public website.

@if ($search === '')

Drag the handle to change the display order. Click the photo count to manage photos.

@else

Clear search to reorder galleries by drag and drop.

@endif
@if (auth()->user()?->canAccessRoute('galleries.store')) @endif
@if ($search !== '') Clear @endif
@forelse ($galleries as $listGallery) @empty @endforelse
Title Slug Photos Views Status Actions
@if ($search === '' && auth()->user()?->canAccessRoute('galleries.reorder')) @endif {{ $listGallery->title }} {{ $listGallery->slug }} @if (auth()->user()?->canAccessRoute('galleries.photos.index')) @else {{ $listGallery->photos_count }} {{ \Illuminate\Support\Str::plural('photo', $listGallery->photos_count) }} @endif {{ $listGallery->view_count }} @if (auth()->user()?->canAccessRoute('galleries.toggle-status')) @else {{ $listGallery->status === 'publish' ? 'Publish' : 'Unpublish' }} @endif @if (auth()->user()?->canAccessRoute('galleries.update')) @endif @if (auth()->user()?->canAccessRoute('galleries.destroy'))
@csrf @method('DELETE')
@endif
No galleries found.

Add Gallery

Status will be Publish by default. Add photos after creating the gallery.

@csrf @include('backend.galleries.partials.form', [ 'idPrefix' => 'create_gallery', 'gallery' => null, 'useOldOnError' => $shouldOpenCreateModal, 'enableTitleAutofill' => true, ])

Edit Gallery

Update gallery details.

Manage Photos

Gallery — drag photos to reorder, drop files to upload.

@push('scripts') @endpush