https://github.com/thewebsolver/inertia
An InertiaJS Adapter for PHP projects that uses implementation of PSR7 (HTTP Message Interface), PSR15 (Server Request Handlers), and optionally PSR11 (Container Interface)
https://github.com/thewebsolver/inertia
adapter inertiajs inertiajs-adapter library psr-11 psr-15 psr-7
Last synced: 9 months ago
JSON representation
An InertiaJS Adapter for PHP projects that uses implementation of PSR7 (HTTP Message Interface), PSR15 (Server Request Handlers), and optionally PSR11 (Container Interface)
- Host: GitHub
- URL: https://github.com/thewebsolver/inertia
- Owner: TheWebSolver
- License: gpl-3.0
- Created: 2024-05-27T07:55:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-01T09:29:41.000Z (almost 2 years ago)
- Last Synced: 2025-06-01T03:39:38.863Z (9 months ago)
- Topics: adapter, inertiajs, inertiajs-adapter, library, psr-11, psr-15, psr-7
- Language: PHP
- Homepage: https://github.com/TheWebSolver/inertia
- Size: 68.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Welcome
**This library is actively being developed and is unstable.**
An **[InertiaJS][Inertia]** Adapter for PHP projects that uses implementation of **[PSR7 (HTTP Message Interface)][PSR7]**, **[PSR15 (Server Request Handlers)][PSR15]**, and optionally **[PSR11 (Container Interface)][PSR11]**.
## Installation (via Composer)
Install library using composer command:
```sh
$ composer require thewebsolver/inertia
```
For seamless handling of Middlewares and storing each middleware response, require [Pipeline][pipeline] library and use it in your request handler. For more details see [pipeline docs][pipelineDocs].
```sh
$ composer require thewebsolver/pipeline
```
## Benefits
- Provides seamless integration with any PHP Project that adheres to the PSR-7 & PSR-15 implementation.
- Fluent API with very less friction and easy setup.
- Works with [Pipeline][pipeline] library to handle Middlewares (including this library's [middleware][middleware]) and retrieve Response back with headers intact.
- Provides option to register your resource/asset version as well as root-view/template using middleware's helper method.
- Provides additional subscription option that gets invoked alongside this library's [middleware][middleware].
- Supports Dependency Injection with your own App Container (that implements [PSR-11][PSR11] _`Psr\Container\ContainerInterface`_).
## Usage
For usage details, visit [Wiki page][wiki].
[Inertia]: https://inertiajs.com/
[PSR7]: https://www.php-fig.org/psr/psr-7/
[PSR11]: https://www.php-fig.org/psr/psr-11/
[PSR15]: https://www.php-fig.org/psr/psr-15/
[pipeline]: https://github.com/TheWebSolver/pipeline
[pipelineDocs]: https://github.com/TheWebSolver/pipeline/wiki/PSR%E2%80%907-&-PSR%E2%80%9015-Bridge
[pipeline]: https://github/com/TheWebSolver/pipeline
[middleware]: /Src/Middleware.php
[wiki]: https://github.com/TheWebSolver/inertia/wiki