RequestGuard (Auth)

RequestGuard

class RequestGuard implements Guard (View source)

Traits

GuardHelpers These methods are typically the same across all guards.

Methods

Authenticatable authenticate()

Determine if the current user is authenticated.

from GuardHelpers
bool check()

Determine if the current user is authenticated.

from GuardHelpers
bool guest()

Determine if the current user is a guest.

from GuardHelpers
int|null id()

Get the ID for the currently authenticated user.

from GuardHelpers
$this setUser(Authenticatable $user)

Set the current user.

from GuardHelpers
void __construct(callable $callback, Request $request)

Create a new authentication guard.

Authenticatable|null 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

Authenticatable authenticate()

Determine if the current user is authenticated.

Return Value

Authenticatable

Exceptions

AuthenticationException

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

$this setUser(Authenticatable $user)

Set the current user.

Parameters

Authenticatable $user

Return Value

$this

void __construct(callable $callback, Request $request)

Create a new authentication guard.

Parameters

callable $callback
Request $request

Return Value

void

Authenticatable|null user()

Get the currently authenticated user.

Return Value

Authenticatable|null

bool validate(array $credentials = array())

Validate a user's credentials.

Parameters

array $credentials

Return Value

bool

$this setRequest(Request $request)

Set the current request instance.

Parameters

Request $request

Return Value

$this

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Auth/RequestGuard.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部