Middleware
class Middleware (View source)
Properties
Methods
Prepend middleware to the application's global middleware stack.
Append middleware to the application's global middleware stack.
Remove middleware from the application's global middleware stack.
Specify a middleware that should be replaced with another middleware.
Define the global middleware for the application.
Define a middleware group.
Prepend the given middleware to the specified group.
Append the given middleware to the specified group.
Remove the given middleware from the specified group.
Replace the given middleware in the specified group with another middleware.
Modify the middleware in the "web" group.
Modify the middleware in the "api" group.
Modify the middleware in the given group.
Register the Folio / page middleware for the application.
Register additional middleware aliases.
Define the middleware priority for the application.
Prepend middleware to the priority middleware.
Append middleware to the priority middleware.
Get the global middleware.
Get the middleware groups.
Configure where guests are redirected by the "auth" middleware.
Configure where users are redirected by the "guest" middleware.
Configure where users are redirected by the authentication and guest middleware.
Configure the cookie encryption middleware.
Configure the CSRF token validation middleware.
Configure the URL signature validation middleware.
Configure the empty string conversion middleware.
Configure the string trimming middleware.
No description
Configure the trusted proxies for the application.
Configure the middleware that prevents requests during maintenance mode.
Indicate that Sanctum's frontend state middleware should be enabled.
Indicate that the API middleware group's throttling middleware should be enabled.
Indicate that Laravel's throttling middleware should use Redis.
Indicate that sessions should be authenticated for the "web" middleware group.
Get the Folio / page middleware for the application.
Get the middleware aliases.
Get the default middleware aliases.
Get the middleware priority for the application.
Get the middleware to prepend to the middleware priority definition.
Get the middleware to append to the middleware priority definition.
Details
$this
prepend(array|string $middleware)
Prepend middleware to the application's global middleware stack.
$this
append(array|string $middleware)
Append middleware to the application's global middleware stack.
$this
remove(array|string $middleware)
Remove middleware from the application's global middleware stack.
$this
replace(string $search, string $replace)
Specify a middleware that should be replaced with another middleware.
$this
prependToGroup(string $group, array|string $middleware)
Prepend the given middleware to the specified group.
$this
appendToGroup(string $group, array|string $middleware)
Append the given middleware to the specified group.
$this
removeFromGroup(string $group, array|string $middleware)
Remove the given middleware from the specified group.
$this
replaceInGroup(string $group, string $search, string $replace)
Replace the given middleware in the specified group with another middleware.
$this
web(array|string $append = [], array|string $prepend = [], array|string $remove = [], array $replace = [])
Modify the middleware in the "web" group.
$this
api(array|string $append = [], array|string $prepend = [], array|string $remove = [], array $replace = [])
Modify the middleware in the "api" group.
protected $this
modifyGroup(string $group, array|string $append, array|string $prepend, array|string $remove, array $replace)
Modify the middleware in the given group.
$this
prependToPriorityList(array|string $before, string $prepend)
Prepend middleware to the priority middleware.
$this
appendToPriorityList(array|string $after, string $append)
Append middleware to the priority middleware.
$this
redirectGuestsTo(callable|string $redirect)
Configure where guests are redirected by the "auth" middleware.
$this
redirectUsersTo(callable|string $redirect)
Configure where users are redirected by the "guest" middleware.
$this
redirectTo(callable|string|null $guests = null, callable|string|null $users = null)
Configure where users are redirected by the authentication and guest middleware.
$this
convertEmptyStringsToNull(array $except = [])
Configure the empty string conversion middleware.
$this
trustProxies(array|string|null $at = null, int|null $headers = null)
Configure the trusted proxies for the application.
$this
preventRequestsDuringMaintenance(array $except = [])
Configure the middleware that prevents requests during maintenance mode.
$this
throttleApi(string $limiter = 'api', bool $redis = false)
Indicate that the API middleware group's throttling middleware should be enabled.
$this
authenticateSessions()
Indicate that sessions should be authenticated for the "web" middleware group.
array
getMiddlewarePriorityPrepends()
Get the middleware to prepend to the middleware priority definition.