Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Inertia Statamic

Inertia Statamic Laravel Package

mattbromley/inertia-statamic

Bridges Inertia.js and Statamic by serving Statamic content through Inertia responses, so you can build Laravel-driven, JavaScript-rendered front ends on top of Statamic entries without hand-wiring the root view and routing yourself.

View on GitHub
Deep Wiki
Context7

A fork of the Inertia.js Statamic adapter by Adam Campbell

Frequently asked questions about Inertia Statamic
What does mattbromley/inertia-statamic actually do?
It is a fork of Adam Campbell's Inertia.js adapter for Statamic. It resolves Statamic routes such as collections, taxonomies, globals, and custom routes into Inertia responses with serialized props, so a Vue, React, or Svelte front end renders the page instead of Antlers. In practice it replaces the Antlers templating pipeline with the standard Inertia monolithic SPA model, using Statamic as the content source rather than a separate headless API.
How do I install inertia-statamic in a Laravel app?
Install it with Composer alongside statamic/cms and inertiajs/inertia-laravel, then register the package's service provider if it is not auto-discovered. You will also need a JavaScript Inertia client and a root Blade view containing the Inertia directive. Check the repository README for the exact provider name and any publishable config, since the fork's installation details may differ slightly from upstream.
Which Laravel, Statamic, Inertia, and PHP versions are supported?
The evaluation notes flag version coupling as a real risk: Statamic majors have historically broken routing and the content API, and Inertia 1.x to 2.x changed protocol details. The single release listed is dated 2025-05-17, and no compatibility matrix was provided in the metadata. Before adopting it, diff the composer.json constraints against your Laravel, Statamic, Inertia, PHP, and Node versions, and confirm the intersection is actually validated rather than assumed.
Is this package production-ready or just a prototype?
Treat it as a reference implementation you may have to own. The repository had 4 stars and 0 dependents at evaluation time, with a single maintainer and one release, so there is effectively no production usage shaking out bugs. It is viable for a prototype or for a team with spare capacity to maintain a fork, but it is not a defensible default for a long-lived production site without a mitigation plan.
How is this fork different from Adam Campbell's upstream Inertia-Statamic adapter?
The package description only says it is a fork of Adam Campbell's adapter, so the practical answer is to diff the two repositories. Check whether the fork is merely a version bump or carries diverging changes, and confirm whether the maintainer intends to track upstream fixes. Because upstream fixes do not arrive automatically in a fork, any divergence becomes code your team owns.
Does it work with Statamic features like Live Preview, revisions, multisite, and static caching?
Not automatically. Anything that depends on Antlers rendering, including tag-based templating, addon-provided tags, Live Preview HTML injection, and some form or search addons, no longer works out of the box and must be reimplemented in JavaScript against Statamic's content API. You also need to confirm that Statamic's route cache and static cache do not conflict with Inertia's asset versioning. Test each feature you rely on before committing to a migration.
How do I test an Inertia and Statamic app so prop mismatches don't reach users?
Inertia prop mismatches fail at render time in the browser rather than at build time, so failures surface to users unless you add end-to-end coverage. Add browser-level tests such as Laravel Dusk or Playwright that assert each Inertia page component receives the props it expects. Also add feature tests on the server side to confirm routes return the right Inertia component and prop shape for each collection, taxonomy, and custom route.
Can I use this with Vue, React, or Svelte?
Yes. The adapter's responsibility is on the server side: resolving Statamic routes into Inertia responses and serialized props. Any Inertia client, including Vue, React, or Svelte, can consume those responses as long as your root view and asset versioning are configured correctly. The choice of front-end framework is independent of the adapter itself.
What are the alternatives if I don't want to depend on this fork?
You can vendor the adapter yourself, since it is likely only a few hundred lines covering a service provider, a response or middleware class, and configuration. Alternatively, fall back to Statamic's REST or GraphQL API with a fully decoupled SPA. A third option is to stay on Antlers for content pages and reserve Inertia for application screens such as dashboards and auth, avoiding the template rewrite entirely.
How much effort is migrating an existing Antlers site to Inertia with this package?
The adapter itself is small; the real work is template rewriting. A proof of concept on a single collection route should take days rather than weeks, but a full site migration is a multi-sprint effort driven by reimplementing Antlers templates and addon behaviour as page props and JavaScript components. Budget for configuration work too, including which routes are Inertia-managed and how caching interacts with asset versioning.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager