class ExceptionResponse implements Responsable

Properties

protected string|null $component
protected array<string, mixed> $props
protected bool $includeSharedData
protected string|null $rootView
protected null|Middleware> $middlewareClass

Methods

__construct(Throwable $exception, Request $request, Response $response, Router $router, Kernel $kernel)

Create a new exception response instance.

render(string $component, array $props = [])

Render the exception with the given Inertia component.

usingMiddleware(string $middlewareClass)

Use the given Inertia middleware.

withSharedData()

Include the middleware shared data.

rootView(string $rootView)

Set the root view.

int
statusCode()

Return the response status code.

Response
toResponse(Request $request)

Create an HTTP response that represents the object.

Middleware|null
resolveMiddleware()

Resolve the Inertia middleware for the request.

string|null
resolveMiddlewareFromRoute()

Resolve the Inertia middleware from the route.

string|null
resolveMiddlewareFromKernel()

Resolve the Inertia middleware from the HTTP kernel.

Details

at line 31
__construct(Throwable $exception, Request $request, Response $response, Router $router, Kernel $kernel)

Create a new exception response instance.

Parameters

Throwable $exception
Request $request
Response $response
Router $router
Kernel $kernel

at line 45
ExceptionResponse render(string $component, array $props = [])

Render the exception with the given Inertia component.

Parameters

string $component
array $props

Return Value

ExceptionResponse

at line 58
ExceptionResponse usingMiddleware(string $middlewareClass)

Use the given Inertia middleware.

Parameters

string $middlewareClass

Return Value

ExceptionResponse

at line 68
ExceptionResponse withSharedData()

Include the middleware shared data.

Return Value

ExceptionResponse

at line 78
ExceptionResponse rootView(string $rootView)

Set the root view.

Parameters

string $rootView

Return Value

ExceptionResponse

at line 88
int statusCode()

Return the response status code.

Return Value

int

at line 96
Response toResponse(Request $request)

Create an HTTP response that represents the object.

Parameters

Request $request

Return Value

Response

at line 131
protected Middleware|null resolveMiddleware()

Resolve the Inertia middleware for the request.

Return Value

Middleware|null

at line 151
protected string|null resolveMiddlewareFromRoute()

Resolve the Inertia middleware from the route.

Return Value

string|null

at line 179
protected string|null resolveMiddlewareFromKernel()

Resolve the Inertia middleware from the HTTP kernel.

Return Value

string|null