In Laravel 5.0, the method redirectPath in trait AuthenticatesAndRegistersUsers checks if property redirectPath or redirectTo exists or not. If it does, the user is redirected to that path.
The question is, where is it set? I understand that its set to the page user was trying to load before she was redirected to /auth/login page. However, I can't figure out where is this being set.
public function redirectPath()
{
if (property_exists($this, 'redirectPath'))
{
return $this->redirectPath;
}
return property_exists($this, 'redirectTo') ? $this->redirectTo : '/home';
}