chedaroo / inertia-marko
The Marko adapter for Inertia.js.
Package info
github.com/chedaroo/inertia-marko
Type:marko-module
pkg:composer/chedaroo/inertia-marko
dev-main
2026-04-05 01:05 UTC
Requires
- php: ^8.5
- marko/routing: *
- marko/view: ^0.1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.94
- pestphp/pest: ^4.4
This package is auto-updated.
Last update: 2026-04-05 01:12:50 UTC
README
The Marko PHP server-side adapter for Inertia.js.
Requirements
- PHP 8.5+
- Marko PHP framework with
marko/viewandmarko/view-latte
Installation
composer require chedaroo/inertia-marko
Usage
use Inertia\InertiaInterface; use Inertia\Middleware\HandleInertiaRequests; use Marko\Routing\Attributes\Get; use Marko\Routing\Attributes\Middleware; use Marko\Routing\Http\Response; class DashboardController { public function __construct( private readonly InertiaInterface $inertia, ) {} #[Get('/dashboard')] #[Middleware(HandleInertiaRequests::class)] public function index(): Response { return $this->inertia->render('Dashboard', [ 'user' => 'Cheda', ]); } }
License
MIT