Skip to content

Commit 22e7698

Browse files
committed
[5.8] Add method to Guard contract
- Added methods to the guard contract, since this methods present in all Laravel Guards, but we could not use this if we will use the contact.
1 parent 79ce705 commit 22e7698

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/Illuminate/Contracts/Auth/Guard.php

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@
44

55
interface Guard
66
{
7+
/**
8+
* Determine if the current user is authenticated.
9+
*
10+
* @return \Illuminate\Contracts\Auth\Authenticatable
11+
*/
12+
public function authenticate();
13+
14+
/**
15+
* Determine if the guard has a user instance.
16+
*
17+
* @return bool
18+
*/
19+
public function hasUser();
20+
721
/**
822
* Determine if the current user is authenticated.
923
*
@@ -47,11 +61,4 @@ public function validate(array $credentials = []);
4761
* @return void
4862
*/
4963
public function setUser(Authenticatable $user);
50-
51-
/**
52-
* Determine if the guard has a user instance.
53-
*
54-
* @return bool
55-
*/
56-
public function hasUser();
5764
}

0 commit comments

Comments
 (0)