I am stuck with getting the redirectTo()
function override in my LoginController.php
as shown in the Laravel docs here.
My controller contains:
/**
* URI where we redirect to after login
*
* @var string
*/
protected $redirectTo = 'player/home';
/**
* Set route redirect
*
* @return mixed
*/
protected function redirectTo()
{
dd("STOP"); <-- does not trigger
if (session()->has('game.details')) {
return route(session()->get('game.details.setup_route'));
} else {
return 'player/home';
}
}
Why would the dd
never trigger and the page always redirects to player/home
? Thanks
dd(session()->get('game.details.setup_route'));
and see the result! - Hiren Gohelplayer/home
. I tried a simpler version of your suggestion. See my question updated. Ta - TheRealPapaprotected $redirectTo
line? - ceejayozdd
call should still occur and interrupt everything. - ceejayozdd
. Still not stopping - TheRealPapa