Skip to content

Capell Inertia

This page is generated from public package documentation in capell-4/packages and the package manifest checked into the source repository.

FieldValue
Composer packagecapell-app/inertia
Package sluginertia
Product groupCapell Frontend
Tiercore
Bundlefrontend
Runtime contextsfrontend
Capell version^4.0
Source repositorycapell-app/packages
Source pathpackages/inertia
Docs sourcepackages/inertia/docs
Manifestcapell.json

Capell Inertia is the shared runtime bridge that lets Capell public pages and package-owned frontend routes render through Inertia instead of Blade-only theme views.

  • Package: capell-app/inertia
  • Namespace: Capell\Inertia\
  • Surfaces: public frontend
  • Service provider: Capell\Inertia\Providers\InertiaServiceProvider
  • Capell dependencies: capell-app/core, capell-app/frontend, capell-app/api
  • Third-party dependency: inertiajs/inertia-laravel

For teams, Capell Inertia makes it possible to ship richer app-like public experiences while keeping normal Capell page, language, layout, theme, asset, and render-hook data in the request.

For developers, it provides one renderer, middleware, root view, facade, adapter registry, and page-prop builder so package routes do not each invent their own Inertia bootstrapping.

  • Registers the FrontendRuntime::Inertia response renderer.
  • Adds the capell.inertia middleware alias and inserts Inertia middleware into frontend routes.
  • Provides the CapellInertia::render() facade for package-owned routes.
  • Builds public page props through BuildInertiaPagePropsAction.
  • Registers an InertiaAdapterRegistry for React/Vue adapter packages.
  • Uses capell-inertia::app as the default root view.

config/capell-inertia.php supports:

KeyDefaultPurpose
adapterenv('CAPELL_INERTIA_ADAPTER', 'vue')Active frontend adapter key.
root_viewcapell-inertia::appInertia root Blade view.
page_componentCapell/PageDefault public page component.

Use the facade for package-owned routes:

use Capell\Inertia\Facades\CapellInertia;
return CapellInertia::render('Capell/Bookings/Request', [
'service' => $serviceData,
'slots' => $slotData,
]);

Use the frontend runtime renderer for normal Capell pages by selecting the Inertia runtime in the theme/package definition. The renderer builds public page payloads with BuildPublicPagePayloadAction, includes layout widget component data when a layout is present, and runs the public authoring-surface assertion before returning the response.

  • Capell Inertia owns the server-side bridge, root view, renderer, middleware, and adapter registry.
  • Adapter packages own framework dependencies and application entrypoints.
  • Theme/component packages own actual React or Vue components.
  • Public Inertia responses must not expose authoring markers, signed editor URLs, admin selectors, model IDs, field paths, or package internals.

Run package tests from the repository root:

Terminal window
vendor/bin/pest packages/inertia/tests --configuration=phpunit.xml