PHPackages                             crmdesenvolvimentos/modules-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. [Framework](/categories/framework)
4. /
5. crmdesenvolvimentos/modules-inertia

ActiveLibrary[Framework](/categories/framework)

crmdesenvolvimentos/modules-inertia
===================================

Relationship Vue/InertiaJs with modular structure Laravel-Modules

12.0(1y ago)1219↓50%MITPHPPHP &gt;=8.1.0

Since May 2Pushed 1y agoCompare

[ Source](https://github.com/crmdesenvolvimentos/modules-inertia)[ Packagist](https://packagist.org/packages/crmdesenvolvimentos/modules-inertia)[ RSS](/packages/crmdesenvolvimentos-modules-inertia/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

Modules-Inertia
===============

[](#modules-inertia)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

The package is designed to be used by Vue/InertiaJs in conjunction with [Laravel-Modules](https://github.com/nWidart/laravel-modules)

Laravel compatibility
---------------------

[](#laravel-compatibility)

Laravelmodules-inertia10.0-12.x1.0.x - 2.0.xInstallation
------------

[](#installation)

**Install the package via composer.**

```
composer require crmdesenvolvimentos/modules-inertia
```

Config Files
------------

[](#config-files)

**In order to edit the default configuration you may execute:**

```
php artisan vendor:publish --provider="Crmdesenvolvimentos\ModulesInertia\ModulesInertiaServiceProvider"

```

Autoloading
-----------

[](#autoloading)

**By default, the module classes are not loaded automatically. You can autoload your modules using psr-4.****For example:**

```
{
  "autoload": {
    "psr-4": {
      "App\\": "app/",
      "Modules\\": "Modules/",
      "Database\\Factories\\": "database/factories/",
      "Database\\Seeders\\": "database/seeders/"
  }

}
```

**Tip: don't forget to run `composer dump-autoload` afterwards.**

Usage
-----

[](#usage)

**By default, Vue module files are created in the module directory Resources/Pages**

**You can change the default directory in config/modules.php**

```
 'Pages/Index' => 'Resources/Pages/Index.vue',
 //...
 'source' => 'Resources/Pages',
```

### For use in Controller

[](#for-use-in-controller)

**The default value of Inertia::render() in a module has been changed to Inertia::module().**

**Inertia::render() is still available by default. It can be used outside of modules**

- `module_name` - real name of the current module
- `file_name` - real name of the file (no extension .vue)
- `directory_name` - if you have nested display folder structure ( you can specify the file path separating by a dot )

**For example:**

```
    public function some_method()
    {
        return Inertia::module('module_name::file_name');
        //
        return Inertia::module('module_name::file_name', ['data'=>'some data']);
        //
        return Inertia::module('module_name::directory_name.file_name', ['data'=>'some data']);
    }
```

### If you use Vue version 3

[](#if-you-use-vue-version-3)

```
import { createApp, h } from "vue";
import { createInertiaApp } from "@inertiajs/inertia-vue3";

createInertiaApp({
  resolve: (name) => {
    const pages = import.meta.glob("./Pages/**/*.vue", { eager: true });
    let isModule = name.split("::");
    if (isModule.length > 1) {
      const pageModules = import.meta.glob("/Modules/**/*.vue", { eager: true });
      let module = isModule[0];
      let pathTo = isModule[1];
      return pageModules[`/Modules/${module}/${pathTo}.vue`];
    } else {
      return pages[`./Pages/${name}.vue`];
    }
  },
  setup({ el, App, props, plugin }) {
    createApp({ render: () => h(App, props) })
      .use(plugin)
      .mount(el);
  },
});
```

Console command
---------------

[](#console-command)

**You can run `php artisan module:publish-stubs` to publish stubs.**

**And override the generation of default files**

After create module
-------------------

[](#after-create-module)

**To be VueJS able to find the created module, you need to rebuild the script**

```
npm run dev
```

Documentation
-------------

[](#documentation)

You'll find installation instructions and full documentation on .

Authors
-------

[](#authors)

- [Nicolas Widart](https://github.com/nWidart/)
- [Yaroslav Fedan](https://github.com/YaroslavFedan/)
- [Celio Martins](https://github.com/crmdesenvolvimentos)
- Add your clickable username here. It should point to your GitHub account.

License
-------

[](#license)

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

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance44

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 67.3% 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 ~76 days

Total

5

Last Release

439d ago

Major Versions

11.3 → 12.02025-03-06

PHP version history (2 changes)11.0PHP &gt;=7.4.0

12.0PHP &gt;=8.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c9be9c071c556b8368514290bda6a98535a78c886e602f6bb4ab6cae0627050?d=identicon)[crmdesenvolvimentos](/maintainers/crmdesenvolvimentos)

---

Top Contributors

[![YaroslavFedan](https://avatars.githubusercontent.com/u/8318982?v=4)](https://github.com/YaroslavFedan "YaroslavFedan (35 commits)")[![toanld](https://avatars.githubusercontent.com/u/33773069?v=4)](https://github.com/toanld "toanld (9 commits)")[![crmdesenvolvimentos](https://avatars.githubusercontent.com/u/30594418?v=4)](https://github.com/crmdesenvolvimentos "crmdesenvolvimentos (8 commits)")

---

Tags

phplaravelvitenwidartinertiajsvuelaravel-modules

### Embed Badge

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

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

###  Alternatives

[mhmiton/laravel-modules-livewire

Using Laravel Livewire in Laravel Modules package with automatically registered livewire components for every modules.

236409.6k9](/packages/mhmiton-laravel-modules-livewire)[toanld/modules-inertia

Relationship Vue/InertiaJs with modular structure Laravel-Modules

141.8k1](/packages/toanld-modules-inertia)[kompo/kompo

Laravel &amp; Vue.js FullStack Components for Rapid Application Development

11812.4k21](/packages/kompo-kompo)[titasgailius/laravel-moonlight

An elegant Laravel scaffolding for your next single-page application.

1446.6k](/packages/titasgailius-laravel-moonlight)

PHPackages © 2026

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