@php
$role = Auth::user()->roles()->first()->name;
// If the role contains "business", set it to "business"
if (Str::contains($role, 'business')) {
$role = 'business';
} elseif ($role == 'pharmacist') {
$role = 'pharmacy';
}
$route = route($role . '.dashboard');
@endphp
Dashboard
@if(Auth::user()->hasRole('patient'))
Medication Orders
@php
$subscription = Auth::user()->activeSubscription();
@endphp
@if($subscription && $subscription->plan->isFamilyPlan())
Family Members
@endif
@endif
@if(Auth::user()->hasRole('admin'))
Users
Subscriptions
Medication Orders
Agents
@endif
@if(Auth::user()->hasRole('agent'))
Enroll
Enrollments
Referrals
Direct Referrals
Referred Enrollments
Commissions
@if(Auth::user()->agent && Auth::user()->agent->canManageLOAs())
LOA Management
@endif
Help
@endif
@if(Auth::user()->hasRole('doctor'))
Patients
Medication Orders
@endif
@if(Auth::user()->hasRole('pharmacist'))
Prescriptions
Inventory
@endif
@if(Auth::user()->hasAnyRole('admin', 'doctor', 'pharmacist'))
Medications
@endif
@if(Auth::user()->hasRole('employee'))
Medical Records
Appointments
Medication Orders
@php
$subscription = Auth::user()->activeSubscription();
@endphp
@if($subscription && $subscription->plan->isFamilyPlan())
Family Members
@endif
Help
@endif