GuardHelpers
These methods are typically the same across all guards.
Table of Contents
- $provider : UserProvider
- The user provider implementation.
- $user : Authenticatable
- The currently authenticated user.
- authenticate() : Authenticatable
- Determine if the current user is authenticated.
- check() : bool
- Determine if the current user is authenticated.
- getProvider() : UserProvider
- Get the user provider used by the guard.
- guest() : bool
- Determine if the current user is a guest.
- id() : int|null
- Get the ID for the currently authenticated user.
- setProvider() : void
- Set the user provider used by the guard.
- setUser() : $this
- Set the current user.
Properties
$provider
The user provider implementation.
protected
UserProvider
$provider
$user
The currently authenticated user.
protected
Authenticatable
$user
Methods
authenticate()
Determine if the current user is authenticated.
public
authenticate() : Authenticatable
Tags
Return values
Authenticatable —check()
Determine if the current user is authenticated.
public
check() : bool
Return values
bool —getProvider()
Get the user provider used by the guard.
public
getProvider() : UserProvider
Return values
UserProvider —guest()
Determine if the current user is a guest.
public
guest() : bool
Return values
bool —id()
Get the ID for the currently authenticated user.
public
id() : int|null
Return values
int|null —setProvider()
Set the user provider used by the guard.
public
setProvider(UserProvider $provider) : void
Parameters
- $provider : UserProvider
Return values
void —setUser()
Set the current user.
public
setUser(Authenticatable $user) : $this
Parameters
- $user : Authenticatable