diff --git a/app/Http/Controllers/Backend/UserAppointmentController.php b/app/Http/Controllers/Backend/UserAppointmentController.php index 01a8e6e9..31018a62 100644 --- a/app/Http/Controllers/Backend/UserAppointmentController.php +++ b/app/Http/Controllers/Backend/UserAppointmentController.php @@ -15,8 +15,10 @@ class UserAppointmentController extends Controller { public function __construct() { + if (auth()->user() == null) { + return redirect(route('login')); + } if (request('type') != 'consultation'){ - dd(auth()->user()); if(!auth()->user()->hasRole('super admin')){ abort(403, 'You don\'t have access to this page'); }