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