PHPackages                             mhmiton/laravel-modules-livewire - 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. mhmiton/laravel-modules-livewire

ActiveLibrary[Framework](/categories/framework)

mhmiton/laravel-modules-livewire
================================

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

v7.0.0(3mo ago)236476.9k↓22.6%42[1 issues](https://github.com/mhmiton/laravel-modules-livewire/issues)[3 PRs](https://github.com/mhmiton/laravel-modules-livewire/pulls)9MITPHPPHP &gt;=8.1

Since Feb 2Pushed 3mo ago6 watchersCompare

[ Source](https://github.com/mhmiton/laravel-modules-livewire)[ Packagist](https://packagist.org/packages/mhmiton/laravel-modules-livewire)[ RSS](/packages/mhmiton-laravel-modules-livewire/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (12)Versions (25)Used By (9)

Laravel Modules With Livewire
=============================

[](#laravel-modules-with-livewire)

Using [Laravel Livewire](https://github.com/livewire/livewire) in [Laravel Modules](https://github.com/nWidart/laravel-modules) package with automatically registered livewire components for every modules.

 [![laravel-modules-livewire](https://camo.githubusercontent.com/a26752beaf3635a5ce0d6edc946e6df8f23884290f70d9953d0c953a974aa201/68747470733a2f2f6465762e6d686d69746f6e2e636f6d2f6c61726176656c2d6d6f64756c65732d6c697665776972652d6578616d706c652f7075626c69632f6173736574732f696d616765732f6c61726176656c2d6d6f64756c65732d6c697665776972652e706e67)](https://camo.githubusercontent.com/a26752beaf3635a5ce0d6edc946e6df8f23884290f70d9953d0c953a974aa201/68747470733a2f2f6465762e6d686d69746f6e2e636f6d2f6c61726176656c2d6d6f64756c65732d6c697665776972652d6578616d706c652f7075626c69632f6173736574732f696d616765732f6c61726176656c2d6d6f64756c65732d6c697665776972652e706e67)

 **Example Source Code:**

 **Example Live Demo:**

### Installation:

[](#installation)

Install through composer:

```
composer require mhmiton/laravel-modules-livewire

```

Publish the package's configuration file:

```
php artisan vendor:publish --tag=modules-livewire:config

```

### Creating Single File Components (SFC):

[](#creating-single-file-components-sfc)

**Command Signature:**

`php artisan module:make-livewire {component} {module} {--sfc} {--force} {--emoji=} {--stub=}`

**Example:**

```
php artisan module:make-livewire sfc.post.create Core --sfc

```

**Force create component if the component already exists:**

```
php artisan module:make-livewire sfc.post.create Core --sfc --force

```

**Output:**

```
COMPONENT CREATED - SFC  🤙

VIEW:  modules/Core/resources/views/livewire/sfc/post/⚡create.blade.php
TAG:

```

**Option (--emoji):**

Use emoji (⚡) in file/directory names (true or false)

```
php artisan module:make-livewire sfc.post.create Core --sfc --emoji=false

```

**Modifying Stubs:**

Check the [Modifying Stubs](#modifying-stubs) section for the `--stub` option.

### Creating Multi File Components (MFC):

[](#creating-multi-file-components-mfc)

**Command Signature:**

`php artisan module:make-livewire {component} {module} {--mfc} {--force} {--emoji=} {--test} {--js} {--stub=}`

**Example:**

```
php artisan module:make-livewire mfc.post.create Core --mfc

```

**Force create component if the component already exists:**

```
php artisan module:make-livewire mfc.post.create Core --mfc --force

```

**Output:**

```
COMPONENT CREATED - MFC  🤙

CLASS:  modules/Core/resources/views/livewire/mfc/post/⚡create/create.php
VIEW:  modules/Core/resources/views/livewire/mfc/post/⚡create/create.blade.php
TAG:

```

**Option (--emoji):**

Use emoji (⚡) in file/directory names (true or false)

```
php artisan module:make-livewire mfc.post.create Core --mfc --emoji=false

```

**Option (--test): Create MFC with test file.:**

```
php artisan module:make-livewire mfc.post.create Core --mfc --test

```

**Option (--js): Create MFC with js file:**

```
php artisan module:make-livewire mfc.post.create Core --mfc --js

```

**Modifying Stubs:**

Check the [Modifying Stubs](#modifying-stubs) section for the `--stub` option.

### Creating Class-based Components:

[](#creating-class-based-components)

**Command Signature:**

`php artisan module:make-livewire {component} {module} {--class} {--view=} {--force} {--inline} {--stub=}`

**Example:**

```
php artisan module:make-livewire Pages/AboutPage Core --class

```

```
php artisan module:make-livewire Pages\\AboutPage Core --class

```

```
php artisan module:make-livewire pages.about-page Core --class

```

**Force create component if the class already exists:**

```
php artisan module:make-livewire Pages/AboutPage Core --class --force

```

**Output:**

```
COMPONENT CREATED - CLASS BASED  🤙

CLASS: Modules/Core/app/Livewire/Pages/AboutPage.php
VIEW:  Modules/Core/resources/views/livewire/pages/about-page.blade.php
TAG:

```

**Inline Component:**

```
php artisan module:make-livewire Pages/AboutPage Core --class --inline

```

**Output:**

```
COMPONENT CREATED - CLASS BASED  🤙

CLASS: Modules/Core/app/Livewire/Pages/AboutPage.php
TAG:

```

**Extra Option (--view):**

**You're able to set a custom view path for component with (--view) option.**

**Example:**

```
php artisan module:make-livewire Pages/AboutPage Core --class --view=pages/about

```

```
php artisan module:make-livewire Pages/AboutPage Core --class --view=pages.about

```

**Output:**

```
COMPONENT CREATED - CLASS BASED  🤙

CLASS: Modules/Core/app/Livewire/Pages/AboutPage.php
VIEW:  Modules/Core/resources/views/livewire/pages/about.blade.php
TAG:

```

### Rendering Components:

[](#rendering-components)

``

**Example:**

```

```

### Modifying Stubs:

[](#modifying-stubs)

Publish the package's stubs:

```
php artisan vendor:publish --tag=modules-livewire:stub

```

After publishing the stubs, will create these files. And when running the make command, will use these stub files by default.

```
// For Single File Component (SFC)
stubs/modules-livewire/livewire-sfc.stub

// For Multi File Component (MFC)
stubs/modules-livewire/livewire-mfc-class.stub
stubs/modules-livewire/livewire-mfc-view.stub
stubs/modules-livewire/livewire-mfc-test.stub
stubs/modules-livewire/livewire-mfc-js.stub

// For Class-based Component
stubs/modules-livewire/livewire.inline.stub
stubs/modules-livewire/livewire.stub
stubs/modules-livewire/livewire.view.stub

// For Volt
stubs/modules-livewire/volt-component-class.stub
stubs/modules-livewire/volt-component.stub

```

**You're able to set a custom stub directory for component with (--stub) option.**

```
php artisan module:make-livewire Pages/AboutPage Core --class --stub=about

```

```
php artisan module:make-livewire Pages/AboutPage Core --class --stub=modules-livewire/core

```

```
php artisan module:make-livewire Pages/AboutPage Core --class --stub=./

```

### Creating Form Components:

[](#creating-form-components)

**Command Signature:**

`php artisan module:make-livewire-form {component} {module} {--force} {--stub=}`

**Example:**

```
php artisan module:make-livewire-form Forms/PostForm Core

```

```
php artisan module:make-livewire-form Forms\\PostForm Core

```

```
php artisan module:make-livewire-form forms.post-form Core

```

**Force create component if the class already exists:**

```
php artisan module:make-livewire-form Forms/PostForm Core --force

```

**Output:**

```
COMPONENT CREATED  🤙

CLASS: Modules/Core/app/Livewire/Forms/PostForm.php

```

### Volt:

[](#volt)

### Creating Volt Components:

[](#creating-volt-components)

**Command Signature:**

`php artisan module:make-volt {component} {module} {--view=} {--class} {--functional} {--force} {--stub=}`

**Example:**

```
php artisan module:make-volt volt.counter Core

```

**Force create component if the view already exists:**

```
php artisan module:make-volt volt.counter Core --force

```

**Output:**

```
VOLT COMPONENT CREATED  🤙

VIEW:  modules/Core/resources/views/livewire/volt/counter.blade.php
TAG:

```

**Option (--view):**

**You're able to set a registered view namespace for component with (--view) option.**

```
php artisan module:make-volt volt.counter Core --view=livewire

```

```
php artisan module:make-volt volt.counter Core --view=pages

```

Note: Only registered view namespace will be support from the "volt\_view\_namespaces" config. By default registered view namespaces are 'livewire' and 'pages' in the config.

```
/*
|--------------------------------------------------------------------------
| View namespaces for volt
|--------------------------------------------------------------------------
|
*/

'volt_view_namespaces' => ['livewire', 'pages'],

```

**Option (--class):**

**You're able to create class based volt component with (--class) option.**

```
php artisan module:make-volt volt.counter Core --class

```

**Option (--functional):**

**You're able to create functional (API style) volt component with (--functional) option.**

```
php artisan module:make-volt volt.counter Core --functional

```

Note:: By default will be create class based or functional component by registered view namespace's files. If any class based component exists on the view namespace, then will be create class based component.

**Modifying Stubs:**

Check the [Modifying Stubs](#modifying-stubs) section for the `--stub` option.

### Rendering Volt Components:

[](#rendering-volt-components)

``

**Tag:**

```

```

**Route:**

```
use Livewire\Volt\Volt;

Volt::route('/volt-counter', 'core::volt.counter');

```

### Custom Module:

[](#custom-module)

**To create components for the custom module, should be add custom modules in the config file.**

The config file is located at `config/modules-livewire.php` after publishing the config file.

Remove comment for these lines &amp; add your custom modules.

```
/*
|--------------------------------------------------------------------------
| Custom modules setup
|--------------------------------------------------------------------------
|
*/

'custom_modules' => [
    // 'Chat' => [
    //     'name_lower' => 'chat',
    //     'path' => base_path('libraries/Chat'),
    //     'app_path' => 'src',
    //     'module_namespace' => 'Libraries\\Chat',
    //     'namespace' => 'Livewire',
    //     'view' => 'resources/views/livewire',
    //     'views_path' => 'resources/views',
    //     'volt_view_namespaces' => ['livewire', 'pages'],
    // ],
],

```

**Custom module config details**

> **name\_lower:** Module name in lower case (required).
>
> **path:** Add module full path (required).
>
> **module\_namespace:** Add module namespace (required).
>
> **namespace:** By default using `config('modules-livewire.namespace')` value. You can set a different value for the specific module.
>
> **view:** By default using `config('modules-livewire.view')` value. You can set a different value for the specific module.
>
> **views\_path:** Module resource view path (required).
>
> **volt\_view\_namespaces:** By default using `config('modules-livewire.volt_view_namespaces')` value. You can set a different value for the specific module.

### License

[](#license)

Copyright (c) 2021 Mehediul Hassan Miton

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

###  Health Score

63

—

FairBetter than 99% of packages

Maintenance80

Actively maintained with recent releases

Popularity56

Moderate usage in the ecosystem

Community32

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 67.9% 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 ~81 days

Recently: every ~56 days

Total

24

Last Release

106d ago

Major Versions

v2.3.0 → v3.0.02024-03-24

v3.0.0 → v4.0.02024-11-20

v4.4.0 → v5.0.02025-02-25

v5.2.0 → v6.0.02026-01-20

v6.2.0 → v7.0.02026-03-19

PHP version history (3 changes)v1.0PHP &gt;=7.3

v2.0.0PHP &gt;=8.0

v2.1.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/32da0ac461afc7803dd05f603044a4a05e93e19d3e4f043ee627f60883f22c03?d=identicon)[mhmiton](/maintainers/mhmiton)

---

Top Contributors

[![mhmiton](https://avatars.githubusercontent.com/u/38657829?v=4)](https://github.com/mhmiton "mhmiton (38 commits)")[![dcblogdev](https://avatars.githubusercontent.com/u/1018170?v=4)](https://github.com/dcblogdev "dcblogdev (3 commits)")[![alissn](https://avatars.githubusercontent.com/u/26966142?v=4)](https://github.com/alissn "alissn (3 commits)")[![tomgrv](https://avatars.githubusercontent.com/u/1809566?v=4)](https://github.com/tomgrv "tomgrv (2 commits)")[![blocklogic-au](https://avatars.githubusercontent.com/u/1908481?v=4)](https://github.com/blocklogic-au "blocklogic-au (2 commits)")[![solomon-ochepa](https://avatars.githubusercontent.com/u/110875083?v=4)](https://github.com/solomon-ochepa "solomon-ochepa (2 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (1 commits)")[![coolsam726](https://avatars.githubusercontent.com/u/5610289?v=4)](https://github.com/coolsam726 "coolsam726 (1 commits)")[![philipnjuguna66](https://avatars.githubusercontent.com/u/25553923?v=4)](https://github.com/philipnjuguna66 "philipnjuguna66 (1 commits)")[![siebsie23](https://avatars.githubusercontent.com/u/25083973?v=4)](https://github.com/siebsie23 "siebsie23 (1 commits)")[![colinmackinlay](https://avatars.githubusercontent.com/u/7833362?v=4)](https://github.com/colinmackinlay "colinmackinlay (1 commits)")[![l3aro](https://avatars.githubusercontent.com/u/25253808?v=4)](https://github.com/l3aro "l3aro (1 commits)")

---

Tags

laravellivewiremodulemodulesnwidartlaravel-moduleslaravel-modulelaravel-livewiremhmitoncustom-modulescustom-module

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mhmiton-laravel-modules-livewire/health.svg)

```
[![Health](https://phpackages.com/badges/mhmiton-laravel-modules-livewire/health.svg)](https://phpackages.com/packages/mhmiton-laravel-modules-livewire)
```

###  Alternatives

[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[tomshaw/electricgrid

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

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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