{{-- Shared error page shell. Child views supply: code, heading, message, glyph and tone (danger | warning | info). Kept self-contained on purpose — an error page must still render when the app's own assets or helpers are the thing that broke. --}} @php $tone = trim($__env->yieldContent('tone')) ?: 'danger'; $tone = in_array($tone, ['danger', 'warning', 'info'], true) ? $tone : 'danger'; // Send signed-in users back to the panel their role can actually open, // otherwise a 403 "Back to Home" just bounces them into another 403. try { $homeUrl = auth()->check() && method_exists(auth()->user(), 'home') ? auth()->user()->home() : url('/'); } catch (\Throwable $e) { $homeUrl = url('/'); } try { $iconHref = favicon(); } catch (\Throwable $e) { $iconHref = null; } @endphp