pepa-linha / nette-inertia
The Nette adapter for Inertia.js.
v1.0.1
2021-01-24 06:23 UTC
Requires
- php: >=7.4
- nette/application: ^3.0
This package is auto-updated.
Last update: 2025-03-24 15:23:57 UTC
README
The Nette adapter for Inertia.js.
Installation
composer require pepa-linha/nette-inertia
Usage
Extends your presenter
class BasePresenter extends InertiaPresenter
and then use $this->inertia(...)
method in your presenters to send page object response.
By default Inertia page component name is the same like presenter name. You can change it by override
getInertiaComponentName
method.
Set the default state of the Inertia application with $inertiaPageObject
in template:
<div id="app" data-page='{$inertiaPageObject|noescape}'></div>