@php // Rendered via App\View\Components\ActionsButtons, which supplies // these as public properties. The null-coalescing keeps the view // safe if a value is ever missing. $entityName = $entityName ?? ($name ?? ''); $viewEvent = $viewEvent ?? ''; $editEvent = $editEvent ?? ''; $deleteEvent = $deleteEvent ?? ''; $route = $route ?? null; $routeParam = $routeParam ?? null; $makeDefault = $makeDefault ?? false; $cannotDelete = $cannotDelete ?? false; $cannotDeleteMessage = $cannotDeleteMessage ?? 'This item cannot be deleted.'; // When no explicit route param name is given, bind the entity // positionally so the URL generates regardless of the parameter // name ({ticket}, {pipeline}, {company}, ...). $routeUrl = null; if ($route) { $routeUrl = $routeParam ? route($route, [$routeParam => $entity->id, 'tab' => 'details']) : route($route, [$entity, 'tab' => 'details']); } @endphp