Guard
interface Guard (View source)
Methods
bool | check() Determine if the current user is authenticated. | |
bool | guest() Determine if the current user is a guest. | |
Authenticatable|null | 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. | |
void | setUser(Authenticatable $user) Set the current user. |
Details
bool check()
Determine if the current user is authenticated.
bool guest()
Determine if the current user is a guest.
Authenticatable|null 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.
void setUser(Authenticatable $user)
Set the current user.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/7.x/Illuminate/Contracts/Auth/Guard.html