File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -56,9 +56,12 @@ public function boot()
56
56
__DIR__ . '/config.php ' => config_path ('modules.php ' )
57
57
]);
58
58
59
- // Register Middlewares
60
- $ this ->aliasMiddleware ('guest ' , Middleware \RedirectIfAuthenticated::class);
61
- $ this ->aliasMiddleware ('admin ' , Middleware \AdminAuthenticated::class);
62
- $ this ->aliasMiddleware ('user ' , Middleware \UserAuthenticated::class);
59
+ // check if authentication module is on
60
+ if ( config ('modules.auth.enabled ' ) )
61
+ {
62
+ $ this ->aliasMiddleware ('guest ' , Middleware \RedirectIfAuthenticated::class);
63
+ $ this ->aliasMiddleware ('admin ' , Middleware \AdminAuthenticated::class);
64
+ $ this ->aliasMiddleware ('user ' , Middleware \UserAuthenticated::class);
65
+ }
63
66
}
64
67
}
Original file line number Diff line number Diff line change 10
10
11
11
// Authentication related settings
12
12
'auth ' => [
13
+ 'enabled ' => false ,
13
14
'user_redirect_route ' => 'user_dashboard ' ,
14
15
'admin_redirect_route ' => 'admin_dashboard '
15
16
],
You can’t perform that action at this time.
0 commit comments