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 56
protected array
frontendMiddleware()
Get the middleware that should be applied to requests from the "frontend".
at line 94
static bool
fromFrontend(Request $request)
Determine if the given request is from the first-party application frontend.
at line 156
static void
resolveStatefulRequestsUsing(Closure|null $callback)
Register a closure that determines whether the current request is stateful.
The closure receives the current request and returns the final stateful decision. Persists for the worker lifetime.
at line 171
static void
resolveStatefulDomainsUsing(Closure|null $callback)
Register a closure that resolves stateful domains for the current request.
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 180
static void
flushState()
Flush all static state.