EnsureFrontendRequestsAreStateful
class EnsureFrontendRequestsAreStateful
Properties
| static protected null|Request): bool | $statefulRequestResolver | The closure used to determine whether the current request is stateful. |
|
| static protected null|Request): array<int, string> | $statefulDomainsResolver | The closure used to resolve stateful domains for the current request. |
Methods
Get the middleware that should be applied to requests from the "frontend".
Determine if the given request is from the first-party application frontend.
Register a closure that determines whether the current request is stateful.
Register a closure that resolves stateful domains for the current request.
Flush all static state.
Details
at line 55
protected array
frontendMiddleware()
Get the middleware that should be applied to requests from the "frontend".
at line 93
static bool
fromFrontend(Request $request)
Determine if the given request is from the first-party application frontend.
at line 155
static void
resolveStatefulRequestsUsing(Closure|null $callback)
Register a closure that determines whether the current request is stateful.
Boot-only. The closure receives the current request and returns the final stateful decision. Persists for the worker lifetime.
at line 169
static void
resolveStatefulDomainsUsing(Closure|null $callback)
Register a closure that resolves stateful domains for the current request.
Boot-only. The closure receives the current request and returns the stateful domain list; useful when the list varies by host or other request data. Persists for the worker lifetime.
at line 177
static void
flushState()
Flush all static state.