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

user ( ) : Authenticatable |null

Get the currently authenticated user.

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