Skip to content

Commit

Permalink
Correct method to get authentication model for Laravel 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmcdonald-uk committed Jan 25, 2017
1 parent 99b63d2 commit 2841b88
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Userstamps.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ public function startUserstamping()
*/
protected function getUserClass()
{
if (get_class(auth()) === 'Illuminate\Auth\Guard') {
return auth() -> getProvider() -> getModel();
}

return auth() -> guard() -> getProvider() -> getModel();
}
}

0 comments on commit 2841b88

Please sign in to comment.