rajubepary/laravel-module

This is my package laravel-module

Maintainers

Package info

github.com/rajubeparybd/laravel-module

pkg:composer/rajubepary/laravel-module

Transparency log

Fund package maintenance!

rajubepary

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-08-17 18:52 UTC

This package is auto-updated.

Last update: 2026-08-18 18:23:49 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A powerful and flexible modular architecture package for Laravel applications. This package allows you to seamlessly create, manage, and organize your Laravel application into modular components.

Installation

You can install the package via composer:

composer require rajubepary/laravel-module

After installing the package, run the setup command. This will publish the configuration file and run the necessary migrations:

php artisan lm:setup

If you prefer to do this manually, you can publish the config file and run migrations:

php artisan vendor:publish --tag="module-config"
php artisan migrate

Available Commands

The package provides several Artisan commands to manage your modules. By default, they are prefixed with lm: (you can change this in the laravel-module.php config).

Scaffolding

  • Create a Module: Generate a new module skeleton.
    php artisan lm:module:make {slug}
    (Example: php artisan lm:module:make customers will create a Customers module with controllers, views, config, and routes).

Management

  • List Modules: View all discovered modules and their statuses.
    php artisan lm:module:list
  • Install a Module: Install a specific module.
    php artisan lm:module:install {slug}
  • Activate a Module: Enable an installed module.
    php artisan lm:module:activate {slug}
  • Deactivate a Module: Disable an active module.
    php artisan lm:module:deactivate {slug}
  • Uninstall a Module: Remove a module entirely.
    php artisan lm:module:uninstall {slug}

Usage

When you create a module, a structured directory is created in app/Modules (or your configured path) with a module.json manifest, a service provider, controllers, routes, and views.

Active modules are automatically discovered and loaded into your Laravel application, registering their routes, views, and navigation menus.

You can customize the module path, navigation settings, and more in the published config/laravel-module.php file.

Hooks & Filters

The package includes a built-in WordPress-style hook system to let modules interact without tight coupling. You can use add_action, do_action, add_filter, and apply_filters inside your modules.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.