@php $dashboardRoute = 'welcome'; if (Auth::check()) { if (Auth::user()->role === 'admin') { $dashboardRoute = 'admin.dashboard'; } elseif (Auth::user()->role === 'seller') { $dashboardRoute = 'seller.dashboard'; } elseif (Auth::user()->role === 'storekeeper') { $dashboardRoute = 'storekeeper.dashboard'; } } @endphp {{ config('app.name', 'Laravel') }} Logo
@if (Auth::user()->role === 'admin') {{ __('Admin Dashboard') }} @elseif (Auth::user()->role === 'seller') {{ __('Seller Dashboard') }} @elseif (Auth::user()->role === 'storekeeper') {{ __('Storekeeper Dashboard') }} @else {{ __('Dashboard') }} @endif @can('sell-stock') @if(Auth::user()->role === 'seller') {{ __('My Sales') }} {{ __('Available Stock') }} {{ __('Received Stock') }} @endif @endcan @auth @if(Auth::user()->role === 'admin' || Auth::user()->role === 'storekeeper' || Auth::user()->role === 'seller') {{ __('Stock Overview') }} @endif {{-- **CORRECTED:** Login History Links for Desktop --}} @can('view-my-login-history') {{-- Using the correct Gate --}} {{ __('My Login History') }} @endcan @can('view-all-login-history') {{-- Using the correct Gate --}} {{ __('All Users Login History') }} @endcan {{-- END CORRECTED --}} @endauth
{{ __('Profile') }}
@csrf {{ __('Log Out') }}
@if (Auth::user()->role === 'admin') {{ __('Admin Dashboard') }} @elseif (Auth::user()->role === 'seller') {{ __('Seller Dashboard') }} {{ __('My Sales') }} {{ __('Available Stock') }} {{ __('Received Stock') }} @elseif (Auth::user()->role === 'storekeeper') {{ __('Storekeeper Dashboard') }} @else {{ __('Dashboard') }} @endif @auth @if(Auth::user()->role === 'admin' || Auth::user()->role === 'storekeeper' || Auth::user()->role === 'seller') {{ __('Stock Overview') }} @endif {{-- **CORRECTED:** Login History Links for Responsive Menu --}} @can('view-my-login-history') {{-- Using the correct Gate --}} {{ __('My Login History') }} @endcan @can('view-all-login-history') {{-- Using the correct Gate --}} {{ __('All Users Login History') }} @endcan {{-- END CORRECTED --}} @endauth
{{ Auth::user()->name }}
{{ Auth::user()->email }}
{{ __('Profile') }}
@csrf {{ __('Log Out') }}