Documentation

Guard

Table of Contents

check()  : bool
Determine if the current user is authenticated.
guest()  : bool
Determine if the current user is a guest.
id()  : int|null
Get the ID for the currently authenticated user.
setUser()  : void
Set the current user.
user()  : Authenticatable|null
Get the currently authenticated user.
validate()  : bool
Validate a user's credentials.

Methods

check()

Determine if the current user is authenticated.

public check() : bool
Return values
bool

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

validate()

Validate a user's credentials.

public validate([array<string|int, mixed> $credentials = [] ]) : bool
Parameters
$credentials : array<string|int, mixed> = []
Return values
bool

Search results