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

protected

$user Authenticatable |null

The currently authenticated user.

Default: null
protected

$provider UserProvider

The user provider implementation.

Default: null

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

public

forgetUser ( ) : $this

Forget the current user.

public

getProvider ( ) : UserProvider

Get the user provider used by the guard.

public

setProvider ( UserProvider $provider ) : void

Set the user provider used by the guard.

Parameters