trait
Illuminate
/
Auth
/
GuardHelpers
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
GuardHelpers
Properties
Methods
public
authenticate ( ) : Authenticatable
Determine if the current user is authenticated. If not, throw an exception.
public
hasUser ( ) : bool
Determine if the guard has a user instance.
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
setUser ( Authenticatable $user ) : $this
Set the current user.
Parameters
- $user Authenticatable
public
forgetUser ( ) : $this
Forget the current user.
public
setProvider ( UserProvider $provider ) : void
Set the user provider used by the guard.
Parameters
- $provider UserProvider