@extends('backend.layouts.app') @section('title', 'Edit Photo') @section('content') @php $pageTitle = 'Edit Photo'; $indexRoute = 'content-photo-list.index'; $indexLabel = 'Photo List'; @endphp @include('backend.layouts.partials._page_header') @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
@csrf @method('PUT')

Photo Information

@error('photo_gallery_id')

{{ $message }}

@enderror
@error('photo_sort')

{{ $message }}

@enderror
@if($photo->photo_url)
Current Image

Current: {{ basename($photo->photo_url) }}

@endif @error('photo_url')

{{ $message }}

@enderror
{{-- Translations --}} @if ($photo->photo_main === '1' || $photo->photo_main === 1)

Translations

@php $firstLang = array_key_first($languages->toArray()); $mainLangCode = old('photo_language', $photo->photo_language) ?: $firstLang; @endphp
@foreach ($languages as $code => $descr) @php $translation = $translations->firstWhere('photo_language', $code); $isMain = $code === $mainLangCode; @endphp
@endforeach
@foreach ($languages as $code => $descr) @php $translation = $translations->firstWhere('photo_language', $code); $isMain = $code === $mainLangCode; $descrVal = old("translations.$code.descr", $isMain ? $photo->photo_descr : ($translation->photo_descr ?? '')); @endphp
@error('translations.' . $code . '.descr')

{{ $message }}

@enderror
@endforeach
@endif
Cancel
@endsection @push('scripts') @endpush