E
E
Eugene2020-12-08 21:19:17
Laravel
Eugene, 2020-12-08 21:19:17

How to redirect to the specified route after authorization?

By default, the controller is:
App\Http\Controllers\Auth\LoginController;

protected $redirectTo = RouteServiceProvider::HOME;


How to reassign $redirectTo to the route I need, but it’s better of course that it be a function so that, in addition to the route, I can make a notification after authorization and then only redirect. Should I write this only in __construct?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sanes, 2020-12-08
@Sanes

app/Providers/RouteServiceProvider.php
public const HOME = '/';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question