@extends('backend.layouts.app') @section('title', 'Edit Photo Gallery') @section('content') @php $pageTitle = 'Edit Photo Gallery'; $indexRoute = 'content-photo-gallery.index'; $indexLabel = 'Photo Galleries'; @endphp @include('backend.layouts.partials._page_header')
@csrf @method('PUT')
{{-- Translations --}}

Translations

@php $inputClass = 'dark:bg-dark-900 shadow-theme-xs focus:border-brand-300 focus:ring-brand-500/10 dark:focus:border-brand-800 h-11 w-full rounded-lg border border-gray-300 bg-transparent px-4 py-2.5 text-sm text-gray-800 placeholder:text-gray-400 focus:ring-3 focus:outline-hidden dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30'; $firstLang = array_key_first($languages->toArray()); $mainLangCode = $firstLang; foreach ($languages as $code => $descr) { $oldMain = old('translations.' . $code . '.main'); if ($oldMain !== null && $oldMain) { $mainLangCode = $code; break; } } if (!old('translations')) { $mainTrans = $gallery->translations->firstWhere('gallery_translation_main', 1); $mainLangCode = $mainTrans ? $mainTrans->gallery_translation_language : $firstLang; } $titleErrorLang = null; foreach ($languages as $code => $descr) { if ($errors->has('translations.' . $code . '.title')) { $titleErrorLang = $code; break; } } $initialLang = $titleErrorLang ?? $mainLangCode; @endphp
@foreach ($languages as $code => $descr) @php $translation = $gallery->translations->firstWhere('gallery_translation_language', $code); $titleVal = old("translations.$code.title", $translation->gallery_translation_title ?? ''); @endphp
@error('translations.' . $code . '.title')

{{ $message }}

@enderror
@endforeach
@foreach ($languages as $code => $descr) @php $translation = $gallery->translations->firstWhere('gallery_translation_language', $code); $titleVal = old("translations.$code.title", $translation->gallery_translation_title ?? ''); $descrVal = old("translations.$code.descr", $translation->gallery_translation_descr ?? ''); @endphp
@error('translations.' . $code . '.descr')

{{ $message }}

@enderror
@endforeach

Gallery Information

@php $inputClass = 'dark:bg-dark-900 shadow-theme-xs focus:border-brand-300 focus:ring-brand-500/10 dark:focus:border-brand-800 h-11 w-full rounded-lg border border-gray-300 bg-transparent px-4 py-2.5 text-sm text-gray-800 placeholder:text-gray-400 focus:ring-3 focus:outline-hidden dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30'; @endphp {{-- Portal --}}
@error('gallery_portal')

{{ $message }}

@enderror
{{-- Gallery Slug --}}
@error('gallery_code')

{{ $message }}

@enderror
{{-- Status + Category --}}
@error('gallery_status')

{{ $message }}

@enderror
@error('gallery_cat')

{{ $message }}

@enderror
{{-- Date + Location --}}
@error('gallery_date')

{{ $message }}

@enderror
@error('gallery_location')

{{ $message }}

@enderror
{{-- Thumbnail --}}
Current Thumbnail @if($gallery->gallery_thumbnail)

Current: {{ str_starts_with($gallery->gallery_thumbnail, 'http') ? $gallery->gallery_thumbnail : basename($gallery->gallery_thumbnail) }}

@endif

Thumbnail · 425 × 300 px · JPG, PNG, WebP · Max 15MB.

@error('gallery_thumbnail')

{{ $message }}

@enderror
Cancel
@endsection