Documentation

InteractsWithAuthentication

Table of Contents

actingAs()  : $this
Set the currently logged in user for the application.
assertAuthenticated()  : $this
Assert that the user is authenticated.
assertAuthenticatedAs()  : $this
Assert that the user is authenticated as the given user.
assertCredentials()  : $this
Assert that the given credentials are valid.
assertGuest()  : $this
Assert that the user is not authenticated.
assertInvalidCredentials()  : $this
Assert that the given credentials are invalid.
be()  : void
Set the currently logged in user for the application.
hasCredentials()  : bool
Return true if the credentials are valid, false otherwise.
isAuthenticated()  : bool
Return true if the user is authenticated, false otherwise.

Methods

assertAuthenticated()

Assert that the user is authenticated.

public assertAuthenticated([string|null $guard = null ]) : $this
Parameters
$guard : string|null = null
Return values
$this

assertCredentials()

Assert that the given credentials are valid.

public assertCredentials(array<string|int, mixed> $credentials[, string|null $guard = null ]) : $this
Parameters
$credentials : array<string|int, mixed>
$guard : string|null = null
Return values
$this

assertGuest()

Assert that the user is not authenticated.

public assertGuest([string|null $guard = null ]) : $this
Parameters
$guard : string|null = null
Return values
$this

assertInvalidCredentials()

Assert that the given credentials are invalid.

public assertInvalidCredentials(array<string|int, mixed> $credentials[, string|null $guard = null ]) : $this
Parameters
$credentials : array<string|int, mixed>
$guard : string|null = null
Return values
$this

hasCredentials()

Return true if the credentials are valid, false otherwise.

protected hasCredentials(array<string|int, mixed> $credentials[, string|null $guard = null ]) : bool
Parameters
$credentials : array<string|int, mixed>
$guard : string|null = null
Return values
bool

isAuthenticated()

Return true if the user is authenticated, false otherwise.

protected isAuthenticated([string|null $guard = null ]) : bool
Parameters
$guard : string|null = null
Return values
bool

Search results