From c6363689d9b43ea694a41c9c64121da27c9e25b3 Mon Sep 17 00:00:00 2001 From: Tetiana Blindaruk Date: Sat, 15 Sep 2018 20:22:15 +0300 Subject: [PATCH] [5.8] Added `hasUser` method to Guard contract; - https://github.com/laravel/framework/pull/24518 in this PR was added method `hasUser` to the GuardHelper trait. As for me it will be useful to have this method in the contract. --- src/Illuminate/Contracts/Auth/Guard.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Illuminate/Contracts/Auth/Guard.php b/src/Illuminate/Contracts/Auth/Guard.php index 2a2ed3d9a5e4..809ffc492692 100644 --- a/src/Illuminate/Contracts/Auth/Guard.php +++ b/src/Illuminate/Contracts/Auth/Guard.php @@ -47,4 +47,11 @@ public function validate(array $credentials = []); * @return void */ public function setUser(Authenticatable $user); + + /** + * Determine if the guard has a user instance. + * + * @return bool + */ + public function hasUser(); }