chedaroo/inertia-marko

The Marko adapter for Inertia.js.
4 2
Install
composer require chedaroo/inertia-marko
Latest Version:v0.1.2
PHP:^8.5
License:MIT
Last Updated:Apr 21, 2026
Links: GitHub  ·  Packagist
Maintainer: chedaroo

inertia-marko

The Marko PHP server-side adapter for Inertia.js.

Requirements

  • PHP 8.5+
  • Marko PHP framework with marko/view and marko/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',
        ]);
    }
}

Development

Devcontainer (recommended)

Open the repo in VS Code and choose Reopen in Container — it will build a PHP 8.5 environment and run composer install automatically. This also works with GitHub Codespaces.

Local setup

Requires PHP 8.5+ and Composer.

git clone https://github.com/chedaroo/inertia-marko.git
cd inertia-marko
composer install

Running tests

composer test

Checking code style

composer format:check

To auto-fix:

composer format

License

MIT

Related Packages

outhebox/laravel-translations

Manage your Laravel translations with a beautiful UI. Add, edit, delete, import,...

105,503 815
akira/laravel-spectra

Illuminate your API — interactive inspector for Laravel 12 with Inertia + React

13 4
samushi/domion

Domion - Professional Architecture for Laravel with Automated Frontend & Auth In...

66 0
laravilt/laravilt

Laravilt - Modern Laravel Admin Panel with Vue 3, Inertia.js, and AI capabilitie...

258 106
inertiajs/inertia-laravel

The Laravel adapter for Inertia.js.

67,875,936 2,464