@php $isEdit = isset($category); $route = $isEdit ? route('category.update', $category->id) : route('category.store'); @endphp