Answer the question
In order to leave comments, you need to log in
How to redirect after authorization in Laravel 5.2?
tell me how to make a redirect to the main "/" after the user has logged in, the default is / home in routes.php, if I change to / home to / gives an error
Answer the question
In order to leave comments, you need to log in
Mikhail Osher and lynnikvadim redirect works only on open links, if the link is only for authorized users, then this garbage happens:
I'm trying to make an entrance to the admin panel only for authorized users. In routes.php I write the route
Route::get('/adminzone', ['middleware' => 'auth', function() {
// Доступ разрешён только аутентифицированным пользователям...
return view('admin.admin_template');
}]);
In /app/Http/Controllers/Auth/AuthController.php write protected $redirectTo = 'url';
(url - the address where you want to go.)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question