@php $user = auth()->user(); $reports = $user->can('view-reports'); // 'tab' = shown in the phone tab bar (max five); everything shows in the desktop bar. $nav = collect([ ['label' => 'Home', 'route' => 'dashboard', 'active' => 'dashboard', 'show' => $reports, 'tab' => true], ['label' => 'Calendar', 'route' => 'calendar', 'active' => 'calendar', 'show' => true, 'tab' => true], ['label' => 'Bookings', 'route' => 'bookings.index', 'active' => 'bookings.*', 'show' => true, 'tab' => true], ['label' => 'Expenses', 'route' => 'expenses.index', 'active' => 'expenses.*', 'show' => true, 'tab' => true, 'badge' => App\Models\Expense::approvableBy($user)->count()], ['label' => 'Reports', 'route' => 'reports.index', 'active' => 'reports.*', 'show' => $reports, 'tab' => true], ['label' => 'Properties', 'route' => 'properties.index', 'active' => 'properties.*', 'show' => true, 'tab' => ! $reports], ['label' => 'Users', 'route' => 'users.index', 'active' => 'users.*', 'show' => $user->can('viewAny', App\Models\User::class), 'tab' => false], ])->where('show', true); @endphp @include('layouts.head')
{{ config('app.name') }}
{{ Str::upper(Str::substr($user->name, 0, 1)) }}
{{ $user->name }} ยท {{ $user->role->label() }}
@foreach ($nav->where('tab', false) as $item) {{ $item['label'] }} @endforeach Change password
@csrf
{{ $slot }}
{{-- Confirmation toast: from a redirect (session) or a same-page action (notify event). --}}
{{ session('status') }}