- PHP 8.3 or later.
- The PHP JSON extension.
- Composer 2.
No PHP framework, PSR-7 implementation, session library, template engine, or frontend build tool is required.
composer require php-forge/inertia:^0.5The package exposes the PHPForge\Inertia\ namespace through PSR-4 autoloading.
The package intentionally provides protocol data rather than an HTTP integration. Before using it in an application, implement a small adapter that can:
- Build a
RequestContextfrom the active HTTP request. - Build a
PageInputfrom application data. - Translate the returned protocol result into the application's response type.
- Render the root HTML document for
InitialPageResult.
Continue with the configuration and adapter reference.