laravel-arcanist / inertia-response-renderer
Inertia response renderer for Arcanist
Fund package maintenance!
ksassnowski
Installs: 2 130
Dependents: 0
Suggesters: 0
Security: 0
Stars: 13
Watchers: 3
Forks: 10
Open Issues: 2
Requires
- php: ^8.0
- inertiajs/inertia-laravel: ^0.5.2
- laravel-arcanist/arcanist: ^0.7.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.13
- mockery/mockery: ^1.4
- orchestra/testbench: ^6.17 || ^7.6
- phpunit/phpunit: ^9.0
- roave/security-advisories: dev-master
README
This package provides an Inertia.js response renderer for Arcanist.
The real docs are still being written, but here’s a really quick introduction.
Installation
Install the package through composer (you still need the main Arcanist package installed).
composer require laravel-arcanist/inertia-response-renderer
Inside config/arcanist.php
, change the renderers.renderer
key to
Arcanist\InertiaResponseRenderer::class
.
That’s it.
How it works
The reponse renderer will try and resolve step templates via the following convention:
resources/js/Pages/Wizards/{wizard-slug}/{step-slug}.vue
You can configure the Wizard
path prefix by changing the
renderers.inertia.component_base_path
setting in the config.
View Data
Arcanist passes a step
and wizard
prop to all views. These can be accessed
in the usual Inertia way.
this.$page.props.arcanist.wizard this.$page.props.arcanist.step
Please refer to the main documentation for a more detailed explanation of these variables.