File tree Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Original file line number Diff line number Diff line change 88if (! function_exists ('can ' )) {
99 function can (string $ action ): bool
1010 {
11- if (auth ()->user () === null ) {
12- return false ;
13- }
14-
1511 return auth ()->user ()->can ($ action );
1612 }
1713}
1814
1915if (! function_exists ('cannot ' )) {
2016 function cannot (string $ action ): bool
2117 {
22- if (auth ()->user () === null ) {
23- return false ;
24- }
25-
2618 return auth ()->user ()->cannot ($ action );
2719 }
2820}
2921
3022if (! function_exists ('hasRole ' )) {
3123 function hasRole (string $ role ): bool
3224 {
33- if (auth ()->user () === null ) {
34- return false ;
35- }
36-
3725 return auth ()->user ()->hasRole ($ role );
3826 }
3927}
Original file line number Diff line number Diff line change 2323 Route::get ('/ ' , Dashboard::class)->name ('dashboard ' );
2424
2525 Route::view ('developer-reference ' , 'developer-reference ' )
26- ->name ('developer-reference ' );
26+ ->name ('developer-reference ' );
2727
2828 Route::get ('2fa ' , [TwoFaController::class, 'index ' ])->name ('admin.2fa ' );
2929 Route::post ('2fa ' , [TwoFaController::class, 'update ' ])->name ('admin.2fa.update ' );
You can’t perform that action at this time.
0 commit comments