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

ActiveLibrary[Framework](/categories/framework)

xslain/laravel-modules-livewire
===============================

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

3.0.1(5mo ago)1101↓75%MITPHPPHP &gt;=8.2

Since Nov 20Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/ogoungaemmanuel/laravel-modules-livewire)[ Packagist](https://packagist.org/packages/xslain/laravel-modules-livewire)[ RSS](/packages/xslain-laravel-modules-livewire/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (0)

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/16a71beb01b21acfa062b16f6a3fc0d5eb2fcb185d2984abe782b1f0e2a2df00/68747470733a2f2f6465762e78736c61696e2e636f6d2f6c61726176656c2d6d6f64756c65732d6c697665776972652d6578616d706c652f7075626c69632f6173736574732f696d616765732f6c61726176656c2d6d6f64756c65732d6c697665776972652e706e67)](https://camo.githubusercontent.com/16a71beb01b21acfa062b16f6a3fc0d5eb2fcb185d2984abe782b1f0e2a2df00/68747470733a2f2f6465762e78736c61696e2e636f6d2f6c61726176656c2d6d6f64756c65732d6c697665776972652d6578616d706c652f7075626c69632f6173736574732f696d616765732f6c61726176656c2d6d6f64756c65732d6c697665776972652e706e67)

 **Example Source Code:**

 **Example Live Demo:**

### Installation:

[](#installation)

Install through composer:

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

```

Publish the package's configuration file:

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

```

### Making Components:

[](#making-components)

**Command Signature:**

`php artisan pagemodule:make-livewire   --view= --force --inline --stub= --custom`

**Example:**

```
php artisan pagemodule:make-livewire Pages/AboutPage Core

```

```
php artisan pagemodule:make-livewire Pages\\AboutPage Core

```

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

```

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

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

```

**Output:**

```
COMPONENT CREATED  🤙

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

```

**Inline Component:**

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

```

**Output:**

```
COMPONENT CREATED  🤙

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

```

**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.

```
stubs/modules-livewire/livewire.inline.stub
stubs/modules-livewire/livewire.stub
stubs/modules-livewire/livewire.view.stub

```

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

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

```

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

```

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

```

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

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

**Example:**

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

```

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

```

**Output:**

```
COMPONENT CREATED  🤙

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

```

### Rendering Components:

[](#rendering-components)

``

**Example:**

```

```

### 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' => [
    //         'path' => base_path('libraries/Chat'),
    //         'module_namespace' => 'Libraries\\Chat',
    //         // 'namespace' => 'Livewire',
    //         // 'view' => 'Resources/views/livewire',
    //         // 'name_lower' => 'chat',
    //     ],
    // ],

```

**Custom module config details**

> **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.
>
> **name\_lower:** By default using module name to lowercase. If you set a custom name, module components will be register by custom name.

### License

[](#license)

Copyright (c) 2021 Mehediul Hassan Miton

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

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance73

Regular maintenance activity

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~128 days

Total

4

Last Release

152d ago

Major Versions

1.0.0 → 2.0.02025-05-05

2.0.0 → 3.0.02025-12-10

PHP version history (2 changes)1.0.0PHP &gt;=8.1

2.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/69cfbb3a98cb81e1bcbc83e1f7a3c49302b01539c944ef9259745865e4c6a621?d=identicon)[xslain](/maintainers/xslain)

---

Top Contributors

[![ogoungaemmanuel](https://avatars.githubusercontent.com/u/20252938?v=4)](https://github.com/ogoungaemmanuel "ogoungaemmanuel (4 commits)")

---

Tags

laravellivewiremodulemodulesnwidartlaravel-moduleslaravel-modulelaravel-livewirecustom-modulescustom-modulexslain

###  Code Quality

Static AnalysisRector

### Embed Badge

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

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

###  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)[nwidart/laravel-modules

Laravel Module management

6.1k14.6M274](/packages/nwidart-laravel-modules)[pingpong/modules

Laravel Modules

592188.7k13](/packages/pingpong-modules)

PHPackages © 2026

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