@php $isEdit = isset($videoGallery) && $videoGallery->exists && $videoGallery->id; $formAction = $isEdit ? route('admin.video-galleries.update', $videoGallery->id) : route('admin.video-galleries.store'); $formMethod = $isEdit ? 'PUT' : 'POST'; $formTitle = $isEdit ? 'Edit Video' : 'Add Video'; $submitText = $isEdit ? 'Update Video' : 'Save Video'; @endphp @if ($errors->any())