interface
Illuminate
/
Contracts
/
Auth
/
Guard
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
Guard
Methods
public
check ( ) : bool
Determine if the current user is authenticated.
public
guest ( ) : bool
Determine if the current user is a guest.
public
id ( ) : int|string|null
Get the ID for the currently authenticated user.
public
validate ( array $credentials ) : bool
Validate a user's credentials.
Parameters
- $credentials array
public
hasUser ( ) : bool
Determine if the guard has a user instance.
public
setUser ( Authenticatable $user ) : $this
Set the current user.
Parameters
- $user Authenticatable