PHPackages                             simtabi/laravel-modulizer - 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. [CLI &amp; Console](/categories/cli)
4. /
5. simtabi/laravel-modulizer

ActiveLibrary[CLI &amp; Console](/categories/cli)

simtabi/laravel-modulizer
=========================

A CLI tool for creating Laravel packages(modules) skeleton.

07PHP

Since Aug 26Pushed 3y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

[![banner](assets/banner.png?raw=true)](assets/banner.png?raw=true)

This package provides you with a simple way to generate a new Laravel module(package) template and, it will let you focus on the development of the package instead of the boilerplate with a [Laravel Modules](https://github.com/nWidart/laravel-modules) experience. If you like a visual explanation [check out this video by Jeffrey Way on Laracasts](https://laracasts.com/series/building-laracasts/episodes/3).

Requirements
============

[](#requirements)

Laravel 8 or 9 and PHP 8.0

Install
=======

[](#install)

You can install the package via composer:

```
composer require simtabi/laravel-modulizer
```

Publish both the `config` and `stubs`:

```
php artisan vendor:publish --provider="Simtabi\Modulizer\ModulizerServiceProvider"
```

This will publish a `modulizer.php` config file

This contains:

```
    'ignore_files' => ['module.json'],
    'modules_path' => env('MODULIZER_MODULES_PATH', 'platform/modules'),
    'stubs_path'   => env('MODULIZER_STUBS_PATH', 'stubs/module'),
```

By default, the stubs will be located at `path-to-vendor-package-folder/stubs/modulizer` you can add your own paths by adding your paths to your .env file or changing the config file.

```
MODULIZER_MODULES_PATH=your-custom-modules-destination-location
MODULIZER_STUBS_PATH=your-custom-stubs-location
```

Usage
=====

[](#usage)

Create or update the stubs file. The filename and contents should have placeholders for example `ModulesController` will be replaced with your name + Controller. ie `ContactsController` when the command is executed.

Placeholders:

These placeholders are replaced with the name provided when running `php artisan modulizer:module:generate`

#### 1. Used in filenames:

[](#1-used-in-filenames)

`Module` = Module name ie `Contacts`

`module` = Module name in lowercase ie `contacts`

`Model` = Model name ie `Contact`

`model` = Model name in lowercase ie `contact`

> For a folder called `Models` rename it to `Entities` it will be renamed when back to Models when generating a new module.

#### 2. Only used inside files:

[](#2-only-used-inside-files)

`{Module}` = Module name ie `PurchaseOrders`

`{module}` = Module name in lowercase ie `purchaseOrder`

`{module_}` = module name with underscores ie `purchase_orders`

`{module-}` = module name with hyphens ie `purchase-orders`

`{module }` = module name puts space between capital letters ie `PurchaseOrders` becomes `Purchase Orders`

`{Model}` = Model name ie `PurchaseOrder`

`{model}` = Model name in lowercase ie `purchaseOrder`

`{model_}` = model name with underscores ie `purchase_orders`

`{model-}` = model name with hyphens ie `purchase-orders`

`{model }` = model name puts space between capital letters ie `PurchaseOrder` becomes `Purchase Order`

Available commands
------------------

[](#available-commands)

### Generate

[](#generate)

**Command:**

```
$ php artisan modulizer:module:generate my-vendor my-package
```

**Result:**The command will handle practically everything for you. It will create a packages directory, creates the vendor and package directory in it, pulls in a skeleton package, sets up composer.json and creates a service provider.

**Options:**

```
$ php artisan modulizer:module:generate my-vendor my-package --i
$ php artisan modulizer:module:generate --i
```

The package will be created interactively, allowing to configure everything in the package's `composer.json`, such as the license and package description.

```
$ php artisan modulizer:module:generate my-vendor/my-package
```

Alternatively you may also define your vendor and name with a forward slash instead of a space.

### Tests

[](#tests)

**Command:**

```
$ php artisan modulizer:module:tests
```

**Result:**Modulizer will go through all maintaining packages (in `platform/modules/`) and publish their tests to `tests/modules`. Add the following to phpunit.xml (under the other testsuites) in order to run the tests from the packages:

```

    ./tests/modules

```

**Options:**

```
$ php artisan modulizer:module:tests my-vendor my-package
```

**Remarks:**If a tests folder exists, the files will be copied to a dedicated folder in the Laravel App tests folder. This allows you to use all of Laravel's own testing functions without any hassle.

### List

[](#list)

**Command:**

```
$ php artisan modulizer:module:list
```

**Result:**An overview of all packages in the `/modules` directory.

**Options:**

```
$ php artisan modulizer:module:list --git
```

The packages are displayed with information on the git status (branch, commit difference with origin) if it is a git repository.

### Remove

[](#remove)

**Command:**

```
$ php artisan modulizer:module:remove my-vendor my-package
```

**Result:**The `my-vendor\my-package` package is deleted, including its references in `composer.json` and `config/app.php`.

### Publish

[](#publish)

**Command:**

```
$ php artisan modulizer:module:publish my-vendor my-package https://github.com/my-vendor/my-package
```

**Result:**The `my-vendor\my-package` package will be published to Github using the provided url.

### Check

[](#check)

**Command:**

```
$ php artisan modulizer:module:check my-vendor my-package
```

**Result:**The `my-vendor\my-package` package will be checked for security vulnerabilities using SensioLabs security checker.

**Remarks**You first need to run

```
$ composer require sensiolabs/security-checker
```

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Contributions are welcome and will be fully credited.

Contributions are accepted via Pull Requests on [Github](https://github.com/simtabi/laravel-modulizer).

Pull Requests
-------------

[](#pull-requests)

- **Document any change in behaviour** - Make sure the `readme.md` and any other relevant documentation are kept up-to-date.
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.

Security
--------

[](#security)

If you discover any security related issues, please email  email instead of using the issue tracker.

Credits &amp; Inspiration
-------------------------

[](#credits--inspiration)

- [Simtabi](https://github.com/simtabi)
- [nWidart](https://github.com/nWidart/laravel-modules)
- [dcblogdev](https://github.com/dcblogdev/laravel-modulizer)
- [Jeroen-G](https://github.com/Jeroen-G/laravel-packager)
- [All Contributors](contributors)

License
-------

[](#license)

Please see the [license file](license.md) for more information.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity25

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e606811f3653a5a5a2a0bc39e2cfd2d52436e7f73da3e416dd13284c7ac87f0a?d=identicon)[simtabi](/maintainers/simtabi)

### Embed Badge

![Health badge](/badges/simtabi-laravel-modulizer/health.svg)

```
[![Health](https://phpackages.com/badges/simtabi-laravel-modulizer/health.svg)](https://phpackages.com/packages/simtabi-laravel-modulizer)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M319](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M18](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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