@php // Safe fallbacks — TenantMiddleware sets these for authenticated/tenant routes. // For guest routes (login, verify) they are undefined, so we default to null. $currentSchool = $currentSchool ?? null; $currentUser = $currentUser ?? auth()->user(); @endphp @yield('title', 'MCSS') — Monrovia Consolidated School System @stack('styles') {{-- ── SIDEBAR ──────────────────────────────────────────────────────── --}} {{-- ── TOP BAR ─────────────────────────────────────────────────────── --}}
@yield('breadcrumb', 'Dashboard')
@if($currentSchool) {{ $currentSchool->code }} @endif @if(auth()->check())
{{ auth()->user()->name }}
{{ str_replace('_',' ', auth()->user()->role) }}
@endif
{{-- ── MAIN ─────────────────────────────────────────────────────────── --}}
{{-- Flash messages --}} @foreach(['success' => 'success', 'info' => 'info', 'error' => 'danger'] as $key => $type) @if(session($key)) @endif @endforeach @if($errors->any())
Please correct the following:
@endif @yield('content')
@stack('scripts')