@php $isEdit = isset($form); $action = $isEdit ? route('forms.update', $form) : route('forms.store'); $method = $isEdit ? 'PUT' : 'POST'; $title = $isEdit ? 'Edit Form' : 'Create New Form'; @endphp