@php // Falls back to the logged-in admin if a controller forgot to pass one // explicitly - keeps every page that extends this layout safe from // "Undefined variable $admin" without repeating this in every method. $admin = $admin ?? auth()->guard('tickets_admin')->user(); @endphp