PHPackages                             yiiex/inertiajs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. yiiex/inertiajs

ActiveLibrary[API Development](/categories/api)

yiiex/inertiajs
===============

Inertia.js server adapter

0.1.0(2w ago)00MITPHPPHP ^8.3

Since May 24Pushed 2w agoCompare

[ Source](https://github.com/yiiex/inertiajs)[ Packagist](https://packagist.org/packages/yiiex/inertiajs)[ RSS](/packages/yiiex-inertiajs/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Yii3 Inertia.js
===============

[](#yii3-inertiajs)

Simple Inertia.js server adapter for Yii3 framework.

Installation
------------

[](#installation)

```
composer require yiiex/inertiajs
```

Current Limitations
-------------------

[](#current-limitations)

- Server-side rendering (SSR) is not supported
- Asset versioning is not implemented
- Only JSON responses for Inertia requests, no partial reloads

### Planned Features

[](#planned-features)

- SSR support
- Asset versioning
- Partial reloads

Setup
-----

[](#setup)

### 1. Add middleware

[](#1-add-middleware)

```
Application::class => [
    '__construct()' => [
        'dispatcher' => DynamicReference::to([
            'class' => MiddlewareDispatcher::class,
            'withMiddlewares()' => [
                [
                    // Your other middlewares
                    InertiaMiddleware::class,
                    Router::class,
                ],
            ],
        ]),
        'fallbackHandler' => Reference::to(NotFoundHandler::class),
    ],
],
```

### 2. Create root view

[](#2-create-root-view)

```

```

### 3. Create Inertia page component

[](#3-create-inertia-page-component)

```
