@php $authUser = Auth::user(); $companyLogoUrl = $authUser?->company?->logo_url; $navLinks = []; $navLinks[] = [ 'label' => 'Dashboard', 'route' => route('dashboard'), 'active' => request()->routeIs('dashboard'), 'icon' => 'M4 13h6v7H4v-7zm10-8h6v15h-6V5zM4 3h6v8H4V3zm10 12h6v3h-6v-3z', ]; if ($authUser && !$authUser->isSuperAdmin() && $authUser->hasPermission('leads.view')) { $navLinks[] = [ 'label' => 'Leads', 'route' => route('leads.index'), 'active' => request()->routeIs('leads.*'), 'icon' => 'M5 4h14a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6a2 2 0 012-2zm0 4h14M7 12h4m-4 4h6', ]; } if ($authUser && !$authUser->isSuperAdmin() && $authUser->hasPermission('projects.view')) { $navLinks[] = [ 'label' => 'Projects', 'route' => route('projects.index'), 'active' => request()->routeIs('projects.*'), 'icon' => 'M4 7.5A2.5 2.5 0 016.5 5h11A2.5 2.5 0 0120 7.5v9A2.5 2.5 0 0117.5 19h-11A2.5 2.5 0 014 16.5v-9zM8 9h8M8 13h5', ]; } if ($authUser && !$authUser->isSuperAdmin() && ($authUser->hasPermission('teams.staff.view') || $authUser->hasPermission('teams.staff.self.manage'))) { $navLinks[] = [ 'label' => 'Staff', 'route' => route('teams.staff.index'), 'active' => request()->routeIs('teams.*') || request()->routeIs('attendance.*'), 'icon' => 'M17 20h5v-2a4 4 0 00-5-3.87M12 14a4 4 0 100-8 4 4 0 000 8zM7 20H2v-2a4 4 0 015-3.87m10-1.13a3 3 0 10-6 0 3 3 0 006 0z', ]; } if ($authUser && !$authUser->isSuperAdmin() && $authUser->hasPermission('settings.roles.manage')) { $navLinks[] = [ 'label' => 'Roles', 'route' => route('settings.roles.index'), 'active' => request()->routeIs('settings.roles.*'), 'icon' => 'M7 7h10M7 12h10M7 17h10M4 7h.01M4 12h.01M4 17h.01', ]; } if ($authUser && !$authUser->isSuperAdmin() && $authUser->hasPermission('settings.users.manage')) { $navLinks[] = [ 'label' => 'Users', 'route' => route('settings.users.index'), 'active' => request()->routeIs('settings.users.*'), 'icon' => 'M5 5h14M5 12h14M5 19h14', ]; } if ($authUser && !$authUser->isSuperAdmin() && $authUser->company_id) { $companySubscription = $authUser->company?->subscription()->with('plan')->latest()->first(); $ticketAccess = $authUser->hasPermission('tickets.view') || $authUser->hasPermission('tickets.create') || $companySubscription?->allows('tickets'); $navLinks[] = [ 'label' => 'Subscription', 'route' => route('company.subscription.index'), 'active' => request()->routeIs('company.subscription.*'), 'icon' => 'M12 2v20M5 7h14M5 17h14', ]; if ($ticketAccess) { $navLinks[] = [ 'label' => 'Tickets', 'route' => route('tickets.index'), 'active' => request()->routeIs('tickets.*'), 'icon' => 'M8 6h8M8 10h8M8 14h5M5 4h14a2 2 0 012 2v10l-4-2-4 2-4-2-4 2V6a2 2 0 012-2z', ]; } } if ($authUser && $authUser->isSuperAdmin()) { $navLinks[] = [ 'label' => 'Locations', 'route' => route('admin.locations.index'), 'active' => request()->routeIs('admin.locations.*'), 'icon' => 'M12 21s-6-5.686-6-10a6 6 0 1112 0c0 4.314-6 10-6 10zm0-7a3 3 0 100-6 3 3 0 000 6z', ]; $navLinks[] = [ 'label' => 'Categories', 'route' => route('admin.categories.index'), 'active' => request()->routeIs('admin.categories.*'), 'icon' => 'M4 6h16M4 12h10M4 18h16', ]; $navLinks[] = [ 'label' => 'Subscriptions', 'route' => route('admin.subscriptions.index'), 'active' => request()->routeIs('admin.subscriptions.*'), 'icon' => 'M12 2v20M5 7h14M5 17h14', ]; } @endphp
@if($companyLogoUrl) {{ $authUser?->company?->name ?? 'Company' }} Logo @else @endif
SaaS Workshop
{{ $authUser?->company?->name ?? 'Admin Panel' }}
Signed in as
{{ $authUser?->name }}
{{ $authUser?->email }}
@foreach($navLinks as $link) {{ $link['label'] }} @endforeach
Profile settings ->
@csrf
@if($companyLogoUrl) {{ $authUser?->company?->name ?? 'Company' }} Logo @else @endif
SaaS Workshop
{{ $authUser?->company?->name ?? 'Admin Panel' }}
@if($companyLogoUrl) {{ $authUser?->company?->name ?? 'Company' }} Logo @else @endif
SaaS Workshop
{{ $authUser?->name }}
@foreach($navLinks as $link) {{ $link['label'] }} @endforeach
Profile settings
@csrf