PHPackages                             hexters/wirehmvc - 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. hexters/wirehmvc

ActiveLibrary[Framework](/categories/framework)

hexters/wirehmvc
================

Package for laravel and livewwire with HMVC convept

1.0.0(2y ago)211MITPHP

Since Oct 15Pushed 2y ago2 watchersCompare

[ Source](https://github.com/hexters/wirehmvc)[ Packagist](https://packagist.org/packages/hexters/wirehmvc)[ RSS](/packages/hexters-wirehmvc/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (9)Used By (0)

Livewire HMVC (Beta)
====================

[](#livewire-hmvc-beta)

[![Latest Stable Version](https://camo.githubusercontent.com/9e98ac76b454ca42c075abfe2c5f8c71252538ecf96a63f8af7aef71b1502505/68747470733a2f2f706f7365722e707567782e6f72672f686578746572732f77697265686d76632f762f737461626c65)](https://packagist.org/packages/hexters/wirehmvc)[![Total Downloads](https://camo.githubusercontent.com/77c98ad7eb7eb1b8fb900a4cdf0286e2f335e3afd84b964dc1f1881afc79be7a/68747470733a2f2f706f7365722e707567782e6f72672f686578746572732f77697265686d76632f646f776e6c6f616473)](https://packagist.org/packages/hexters/wirehmvc)[![License](https://camo.githubusercontent.com/7a23c86a5be46a3f11b059deee1f9d0026fbf4fa95d3c982681c60c7d4690f57/68747470733a2f2f706f7365722e707567782e6f72672f686578746572732f77697265686d76632f6c6963656e7365)](https://packagist.org/packages/hexters/wirehmvc)

This package is a support package for the [hexters/laramodule](https://github.com/hexters/laramodule) package specifically made to integrate [hexters/laramodule](https://github.com/hexters/laramodule) with livewire version 3.

To install through Composer, by run the following command:

```
composer require hexters/wirehmvc
```

Installation
============

[](#installation)

### 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/"
    }
  }
}
```

And make `Modules` directory in your root project folder

```
mkdir Modules
```

Don't forget to run the commands below

```
composer dump-autoload
```

Manually add `LivewireHandleUpdateProvider` to the list of providers in the `app.php` config file

```
. . .

'providers' => ServiceProvider::defaultProviders()->merge([
    /*
    * Package Service Providers...
    */

    Hexters\Wirehmvc\LivewireHandleUpdateProvider::class, // add here

    /*
    * Application Service Providers...
    */
    App\Providers\AppServiceProvider::class,

    . . .
```

### Important notes

[](#important-notes)

If you want to use the `mount()` hook, make sure you run the `parent::mount()` for the parent class, see the example below.

```
. . .

use Hexters\Wirehmvc\Component;

. . .

class Welcome extends Component
{

  public function mount() {
    parent::mount();

    // Your code here...
  }

  public function render()
  {
      return view('admin::livewire.welcome');
  }

. . .
```

### Create Module

[](#create-module)

Follow the command below to create a module, and select Livewire in preset option!

```
php artisan module:make Blog
```

You can also do this with an existing module, but remember that. The `route.php` file will be replaced by a new file.

```
php artisan module:livewire-init --module=Blog
```

### Artisan

[](#artisan)

```
php artisan module:make-livewire Counter --module=Blog
php artisan module:livewire-attribute ArticleTileAttribute --module=Blog
php artisan module:livewire-form ArticleForm --module=Blog
php artisan module:livewire-delete Counter --module=Blog
```

More complete commands can be seen at the link below.

### [Artisan Documentation](https://github.com/hexters/laramodule#artisan)

[](#artisan-documentation)

### Layouting

[](#layouting)

You need a layout for your livewire component, you can use the default layout from livewire and you can also create one specifically for your module.

Default command from livewire

```
php artisan livewire:layout
```

Custom for specific modules

```
php artisan module:livewire-layout --name=app --module=Blog
```

### Rendering components

[](#rendering-components)

Rendering components can only be done on components in the module folder, or you can see `Modules\Blog\Http\Middleware\LivewireSetupBlogMiddleware` class. I assume the module name is `Blog`!

In order for a component to be used in another module, you need to register it first, open the provider in each of your modules, see the example below.

```
. . .

class BlogServiceProvider extends ServiceProvider
{
  . . .

  protected function defineLivewireComponents()
  {
      return [
          NabBar::class,

          // OR

          'nav-bar' => NavBar::class,
      ];
  }
```

Each declared component will be given a prefix according to the module name, so when calling it, you need to add a prefix in front of it, see the example below.

```

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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

Total

8

Last Release

927d ago

Major Versions

0.0.7 → 1.0.02023-11-02

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravellaravel-packagelivewirelaravel-modulelaravel-modularlaravel hmvcLivewire ModuleLivewire ModularLivewire HMVCLivewire Package

### Embed Badge

![Health badge](/badges/hexters-wirehmvc/health.svg)

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

###  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)[hexters/laramodule

Laramodule is an HMVC pattern for the Laravel framework.

322.8k2](/packages/hexters-laramodule)

PHPackages © 2026

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