I'm struggeling with my routing in my laravel 5.2 application.
The intended behaviour is:
- Unregistered User trys to access protected page
- Redirected to Login
- Redirected (on success) to intended page
Of course the user should be redirected to his "dashboard" if there is no intended page (when he activly logged in)
Example:
/* Create a Payment | Only for registered Users (client) */ Route::post('payment', 'PaymentController@create')->middleware('client'); The User will be redirected to the login page, however, after the login, he will be redirected to the page i defined in my authcontroller as $redirectTo
protected $redirectTo = '/backoffice'; Is there a way to set the redirect to something like (inteded or default)
return redirect()->intended('backoffice');as per this? laravel.com/docs/5.2/authentication#authenticating-users