class inertia_adapter

internal  
 

Static adapter that proxies Inertia rendering helpers.

Provides convenience methods to render pages, share globals, manage versions, and perform SPA-friendly redirects.

Methods

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

Render an Inertia page returning the appropriate HTTP response.

static void
share(string $key, mixed $value)

Share a global prop accessible to all Inertia responses.

static void
version(string $version)

Override the current Inertia asset version.

static Response
location(string $route, array $params = [])

SPA-friendly redirect (409 + X-Inertia-Location) or standard redirect.

Details

at line 36
static Response render(string $component, array $props = [])

Render an Inertia page returning the appropriate HTTP response.

Parameters

string $component
array $props

Return Value

Response

at line 44
static void share(string $key, mixed $value)

Share a global prop accessible to all Inertia responses.

Parameters

string $key
mixed $value

Return Value

void

at line 52
static void version(string $version)

Override the current Inertia asset version.

Parameters

string $version

Return Value

void

at line 60
static Response location(string $route, array $params = [])

SPA-friendly redirect (409 + X-Inertia-Location) or standard redirect.

Parameters

string $route
array $params

Return Value

Response