interface Guard

Methods

bool
check()

Determine if the current user is authenticated.

bool
guest()

Determine if the current user is a guest.

user()

Get the currently authenticated user.

int|string|null
id()

Get the ID for the currently authenticated user.

bool
validate(array $credentials = [])

Validate a user's credentials.

bool
hasUser()

Determine if the guard has a user instance.

setUser(Authenticatable $user)

Set the current user.

Details

at line 14
bool check()

Determine if the current user is authenticated.

Return Value

bool

at line 21
bool guest()

Determine if the current user is a guest.

Return Value

bool

at line 28
Authenticatable|null user()

Get the currently authenticated user.

Return Value

Authenticatable|null

at line 35
int|string|null id()

Get the ID for the currently authenticated user.

Return Value

int|string|null

at line 42
bool validate(array $credentials = [])

Validate a user's credentials.

Parameters

array $credentials

Return Value

bool

at line 49
bool hasUser()

Determine if the guard has a user instance.

Return Value

bool

at line 54
Guard setUser(Authenticatable $user)

Set the current user.

Parameters

Authenticatable $user

Return Value

Guard