PHPackages                             leafs/inertia - 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. leafs/inertia

ActiveLibrary[API Development](/categories/api)

leafs/inertia
=============

Leaf PHP adapter for inertia JS

v4.3(9mo ago)11.2k↓63.6%2MITPHP

Since Aug 11Pushed 1mo agoCompare

[ Source](https://github.com/leafsphp/inertia)[ Packagist](https://packagist.org/packages/leafs/inertia)[ Docs](https://leafphp.dev/modules/views/inertia/)[ GitHub Sponsors](https://github.com/leafsphp)[ Fund](https://opencollective.com/leaf)[ RSS](/packages/leafs-inertia/feed)WikiDiscussions v4.x Synced 3w ago

READMEChangelog (8)Dependencies (3)Versions (10)Used By (0)

 [![](https://camo.githubusercontent.com/d98ee5e32c2ff016fdfdac6c42654a908f4cc34b229c7b00caacc5a717455ae8/68747470733a2f2f6c6561667068702e6465762f6c6f676f2d636972636c652e706e67)](https://camo.githubusercontent.com/d98ee5e32c2ff016fdfdac6c42654a908f4cc34b229c7b00caacc5a717455ae8/68747470733a2f2f6c6561667068702e6465762f6c6f676f2d636972636c652e706e67)

Leaf + Inertia
==============

[](#leaf--inertia)

This is a simple package that helps you use [Inertia.js](https://inertiajs.com/) with [Leaf](https://leafphp.dev). It provides a `Inertia` class that makes it easy to return Inertia responses from your Leaf controllers and output Inertia template in your Leaf views.

Since Leaf supports multiple templating engines, inertia uses the engine configured in your view config.

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

[](#installation)

**Note: This is already done for you in Leaf MVC.**

Since this is the server-side adapter for Leaf, you need to install Inertia for whatever framework you're using on the client-side. You can find a list on the [Inertia website](https://inertiajs.com/).

```
npm install @inertiajs/react
```

After this, you can add the Leaf adapter to your project using the Leaf CLI:

```
leaf install inertia
```

Or with composer:

```
composer require leafs/inertia
```

Usage
-----

[](#usage)

To get started, you need replace your Leaf view with the Inertia component. In place of your default Leaf view, you should return the `Inertia::render` method. This method accepts the name of your component as its first argument, and an array of data as its second argument:

```
app()->get('/', function() {
    return Inertia::render('Home', [
        'name' => 'Leaf'
    ]);
});
```

**Full docs on [the leaf docs](https://leafphp.dev/modules/views/inertia/).**

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance77

Regular maintenance activity

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~126 days

Recently: every ~105 days

Total

9

Last Release

34d ago

Major Versions

v0.1.0 → v4.02023-08-11

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29547806?v=4)[Mychi](/maintainers/Mychi)[@mychi](https://github.com/mychi)

---

Top Contributors

[![mychidarko](https://avatars.githubusercontent.com/u/26604242?v=4)](https://github.com/mychidarko "mychidarko (32 commits)")[![ghosthi](https://avatars.githubusercontent.com/u/85212306?v=4)](https://github.com/ghosthi "ghosthi (1 commits)")[![phederal](https://avatars.githubusercontent.com/u/38112007?v=4)](https://github.com/phederal "phederal (1 commits)")

---

Tags

inertiareactvuesvelteleafPHP

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/leafs-inertia/health.svg)

```
[![Health](https://phpackages.com/badges/leafs-inertia/health.svg)](https://phpackages.com/packages/leafs-inertia)
```

###  Alternatives

[erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.

4821.5k](/packages/erag-laravel-lang-sync-inertia)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
