internachi/modularize

Maintainers

👁 inxilpro

Package info

github.com/InterNACHI/modularize

pkg:composer/internachi/modularize

Statistics

Installs: 141 720

Dependents: 3

Suggesters: 0

Stars: 2

Open Issues: 0

1.1.1 2026-03-23 14:50 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 09965fcea17de5f5f84e6e1aae45f0973753be1a

laravelmodularInterNACHI

This package is auto-updated.

Last update: 2026-06-23 15:21:42 UTC


README

👁 Build Status
👁 Latest Stable Release
👁 MIT Licensed

Modularize

Traits for package authors to add internachi/modular support to their Laravel commands.

Installation

composer require internachi/modularize

Usage

Add the Modularize trait to your package commands:

use Illuminate\Console\Command;
use InterNACHI\Modularize\Support\Modularize;

class SomeCommand extends Command
{
 use Modularize;

 public function handle()
 {
 if ($module = $this->module()) {
 // Command was called with --module, $module is a ModuleConfig class
 // with name, base path, namespaces, and helper methods.
 }
 }
}

If you're using Laravel file generator commands, add the ModularizeGeneratorCommand trait:

use Illuminate\Console\GeneratorCommand;
use InterNACHI\Modularize\Support\ModularizeGeneratorCommand;

class MakeWidget extends GeneratorCommand
{
 use ModularizeGeneratorCommand;

 // ...
}

This adds a --module option to your command. When used, generated files are placed in the module directory with correct namespacing.