class RequestGuard implements Guard (View source)

Traits

These methods are typically the same across all guards.

Methods

bool
check()

Determine if the current user is authenticated.

bool
guest()

Determine if the current user is a guest.

int|null
id()

Get the ID for the currently authenticated user.

void
setUser( Authenticatable $user)

Set the current user.

void
__construct( callable $callback, Request $request)

Create a new authentication guard.

user()

Get the currently authenticated user.

bool
validate( array $credentials = array())

Validate a user's credentials.

$this
setRequest( Request $request)

Set the current request instance.

Details

bool check()

Determine if the current user is authenticated.

Return Value

bool

bool guest()

Determine if the current user is a guest.

Return Value

bool

int|null id()

Get the ID for the currently authenticated user.

Return Value

int|null

void setUser( Authenticatable $user)

Set the current user.

Parameters

Authenticatable $user

Return Value

void

at line line 33
void __construct( callable $callback, Request $request)

Create a new authentication guard.

Parameters

callable $callback
Request $request

Return Value

void

at line line 45
Authenticatable|null user()

Get the currently authenticated user.

Return Value

Authenticatable|null

at line line 63
bool validate( array $credentials = array())

Validate a user's credentials.

Parameters

array $credentials

Return Value

bool

at line line 76
$this setRequest( Request $request)

Set the current request instance.

Parameters

Request $request

Return Value

$this