Created
January 28, 2022 17:14
-
-
Save emprendenauta/6a9a96f297fd508e075ccf87233a9105 to your computer and use it in GitHub Desktop.
Redirect user if is authenticated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| Route::get('/', function () { | |
| // Si el usuario está autenticado/ ha iniciado sesión redireccionará a la página de admin | |
| // if user is authenticated will redirecto to admin section | |
| if (Auth::check()) { | |
| return redirect()->to(route('admin')); | |
| } | |
| return view('public-home'); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment