GuardHelpers (Auth)

GuardHelpers

trait GuardHelpers (View source)

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.

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

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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部