Middleware
class Middleware
Properties
| protected string | $rootView | The root template that's loaded on the first page visit. |
|
| protected bool | $withAllErrors | Determines if validation errors should be mapped to a single error message per field. |
|
| protected array<int, string> | $withoutSsr | The paths that should be excluded from server-side rendering. |
Methods
Define a callback that returns the relative URL.
Determine if the redirect response contains a URL fragment.
Flush all static state.
Details
at line 55
string|null
version(Request $request)
Determine the current asset version.
The result is cached for the worker lifetime to avoid repeated filesystem I/O on every request.
at line 90
array
share(Request $request)
Define the props that are shared by default.
at line 102
array
shareOnce(Request $request)
Define the props that are shared once and remembered across navigations.
at line 110
string
rootView(Request $request)
Set the root template that is loaded on the first page visit.
at line 118
Closure|null
urlResolver()
Define a callback that returns the relative URL.
at line 187
protected bool
redirectHasFragment(Response $response)
Determine if the redirect response contains a URL fragment.
at line 195
protected void
reflash(Request $request)
Reflash the session data for the next request.
at line 205
Response
onEmptyResponse(Request $request, Response $response)
Handle empty responses.
at line 213
Response
onRedirectWithFragment(Request $request, Response $response)
Handle redirects with URL fragments.
at line 223
Response
onVersionChange(Request $request, Response $response)
Handle version changes.
at line 237
object
resolveValidationErrors(Request $request)
Resolve validation errors for client-side use.
at line 266
static void
flushState()
Flush all static state.