R
R
Roman2019-03-08 15:02:01
Laravel
Roman, 2019-03-08 15:02:01

How to redirect after login not to uri, but to route (protected $redirectTo = route('otheruri') - doesn't work)?

Hello.
I decided to redo the redirect to LoginController, replaced it with but it does not work. How it is possible to register a redirect through route in this case? Thank you.
protected $redirectTo = '/home';
protected $redirectTo = route('anyotheruri');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2019-03-08
@procode

public function __construct()
{
    $this->redirectTo = route('another-uri');
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question