RequestGuard
class RequestGuard implements Guard (View source)
Traits
These methods are typically the same across all guards.
Properties
protected Authenticatable|null | $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
authenticate()
Determine if the current user is authenticated. If not, throw an exception.
from
GuardHelpers
static void
mixin(object $mixin, bool $replace = true)
Mix another object into the class.
from
Macroable
static mixed
__callStatic(string $method, array $parameters)
Dynamically handle calls to the class.
from
Macroable
mixed
__call(string $method, array $parameters)
Dynamically handle calls to the class.
from
Macroable
__construct(callable $callback, Request $request, UserProvider|null $provider = null)
Create a new authentication guard.
Authenticatable|null
user()
Get the currently authenticated user.
bool
validate(array $credentials = [])
Validate a user's credentials.
$this
Details
Authenticatable
authenticate()
Determine if the current user is authenticated. If not, throw an exception.
__construct(callable $callback, Request $request, UserProvider|null $provider = null)
Create a new authentication guard.