Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Modularize Laravel Package

internachi/modularize

Adds InterNACHI Modular support to Laravel Artisan commands. Use the Modularize traits to add a --module option so commands and generator commands can target a specific module, placing generated files in the module directory with correct namespaces.

View on GitHub
Deep Wiki
Context7

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope