From bab00f2ccb2b625cb7066aa40b45179f68d05645 Mon Sep 17 00:00:00 2001 From: Grant Holle Date: Fri, 25 May 2018 10:24:53 +0800 Subject: [PATCH] Return $this from login() to allow for chaining --- src/Auth/Guard.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Auth/Guard.php b/src/Auth/Guard.php index 30522c7..2efa3b2 100644 --- a/src/Auth/Guard.php +++ b/src/Auth/Guard.php @@ -216,7 +216,7 @@ protected function hasValidCredentials($user, $credentials) * Login a given user. It means, generate a new token for a user. * * @param Authenticatable $user - * @return mixed + * @return $this */ public function login(Authenticatable $user) { @@ -226,6 +226,8 @@ public function login(Authenticatable $user) $this->fireLoginEvent($user); $this->setUser($user); + + return $this; } /**