PHPackages                             martinpham/laravel-inertia-attributes - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. martinpham/laravel-inertia-attributes

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

martinpham/laravel-inertia-attributes
=====================================

Add Inertia attributes to Laravel project

1.1(10mo ago)0127MITPHP

Since Aug 10Pushed 10mo agoCompare

[ Source](https://github.com/MartinPham/laravel-inertia-attributes)[ Packagist](https://packagist.org/packages/martinpham/laravel-inertia-attributes)[ RSS](/packages/martinpham-laravel-inertia-attributes/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

Laravel Inertia Attributes
==========================

[](#laravel-inertia-attributes)

Add Inertia.js attributes to your Laravel project using PHP 8 attributes.

Requirements
------------

[](#requirements)

- PHP 8.0 or higher
- Laravel 8.x, 9.x, 10.x, 11.x, or 12.x
- Inertia.js

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

[](#installation)

You can install the package via composer:

```
composer require martinpham/laravel-inertia-attributes
```

Register middleware

```
        $middleware->web(append: [
            \MartinPham\InertiaAttributes\Http\Middleware\InertiaAttributesMiddleware::class,
        ]);
```

Usage
-----

[](#usage)

This package allows you to use PHP 8 attributes to define Inertia.js properties and methods in your Laravel controllers.

### Basic Example

[](#basic-example)

```
use MartinPham\InertiaAttributes\Attributes\InertiaPage;

class UserController extends Controller
{
    #[InertiaPage('User/Index')]
    public function index()
    {

    }

    #[InertiaPage('User/Show')]
    public function show(User $user)
    {

    }
}
```

Credits
-------

[](#credits)

- [Martin Pham](https://github.com/martinpham)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance54

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

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 ~0 days

Total

2

Last Release

321d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/57ee82f8ac85c20fb66ca3fed44b25ca936b99bc77d593ae117996252a9e609b?d=identicon)[martinpham](/maintainers/martinpham)

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/martinpham-laravel-inertia-attributes/health.svg)

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

###  Alternatives

[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17818.7k](/packages/markwalet-nova-modal-response)[crumbls/layup

A visual page builder plugin for Filament 5 — Divi-style grid layouts with extensible widgets.

591.7k1](/packages/crumbls-layup)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.2k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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