From 2841b8805850d985a82b11529f68dc549a497d8a Mon Sep 17 00:00:00 2001 From: Matt McDonald Date: Wed, 25 Jan 2017 09:44:56 +0000 Subject: [PATCH] Correct method to get authentication model for Laravel 5.1 --- src/Userstamps.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Userstamps.php b/src/Userstamps.php index b7a1358..ffe4f66 100644 --- a/src/Userstamps.php +++ b/src/Userstamps.php @@ -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(); } }