Skip to content

Commit

Permalink
Add auth redirect path generation method (#16896)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pe Ell authored and taylorotwell committed Dec 21, 2016
1 parent 30867d3 commit 794b260
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Foundation/Auth/RedirectsUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ trait RedirectsUsers
*/
public function redirectPath()
{
if (method_exists($this, 'redirectTo')) {
return $this->redirectTo();
}

return property_exists($this, 'redirectTo') ? $this->redirectTo : '/home';
}
}

3 comments on commit 794b260

@jhourlad
Copy link

@jhourlad jhourlad commented on 794b260 Apr 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems still a problem redirecting to "/home" after registration.
Using Laravel 5.4.16, by the way.

@usamamashkoor
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am facing the same problem in laravel 5.4

@G-Start2021
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

проблема осталась и у laravel 8 (

Please sign in to comment.