Skip to content

Commit bec166b

Browse files
committed
fix: appointment page
1 parent 10bf7ed commit bec166b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/Http/Controllers/Backend/UserAppointmentController.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
class UserAppointmentController extends Controller
1616
{
1717
public function __construct() {
18+
if (auth()->user() == null) {
19+
return redirect(route('login'));
20+
}
1821
if (request('type') != 'consultation'){
19-
dd(auth()->user());
2022
if(!auth()->user()->hasRole('super admin')){
2123
abort(403, 'You don\'t have access to this page');
2224
}

0 commit comments

Comments
 (0)