RequestGuard
class RequestGuard implements Guard
Traits
These methods are typically the same across all guards.
Properties
protected Authenticatable | $user | The currently authenticated user. |
from GuardHelpers |
protected UserProvider | $provider | The user provider implementation. |
from GuardHelpers |
static protected array | $macros | The registered string macros. |
from Macroable |
protected callable | $callback | The guard callback. |
|
protected Request | $request | The request instance. |
Methods
Dynamically handle calls to the class.
Dynamically handle calls to the class.
Get the currently authenticated user.
Validate a user's credentials.
Details
in
GuardHelpers at line 33
Authenticatable
authenticate()
Determine if the current user is authenticated.
in
GuardHelpers at line 47
bool
check()
Determine if the current user is authenticated.
in
GuardHelpers at line 57
bool
guest()
Determine if the current user is a guest.
in
GuardHelpers at line 67
int|null
id()
Get the ID for the currently authenticated user.
in
GuardHelpers at line 80
$this
setUser(Authenticatable $user)
Set the current user.
in
Macroable at line 24
static void
macro(string $name, callable $macro)
Register a custom macro.
in
Macroable at line 35
static bool
hasMacro(string $name)
Checks if macro is registered.
in
Macroable at line 49
static mixed
__callStatic(string $method, array $parameters)
Dynamically handle calls to the class.
in
Macroable at line 71
mixed
__call(string $method, array $parameters)
Dynamically handle calls to the class.
at line 34
void
__construct(callable $callback, Request $request)
Create a new authentication guard.
at line 45
Authenticatable|null
user()
Get the currently authenticated user.
at line 65
bool
validate(array $credentials = [])
Validate a user's credentials.
at line 78
$this
setRequest(Request $request)
Set the current request instance.