PHPackages                             dev-sajid/laravel-modular - 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. dev-sajid/laravel-modular

ActiveLibrary[Framework](/categories/framework)

dev-sajid/laravel-modular
=========================

Lightweight Laravel modularization: drop-in modules under modules/ with auto-discovery, no external dependencies.

2.0.0(10mo ago)01MITPHPPHP ^8.2CI passing

Since Aug 23Pushed 10mo agoCompare

[ Source](https://github.com/dev-sajid007/laravel-modular)[ Packagist](https://packagist.org/packages/dev-sajid/laravel-modular)[ RSS](/packages/dev-sajid-laravel-modular/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (3)Used By (0)

Laravel Modular v2.0
====================

[](#laravel-modular-v20)

[![Latest Version on Packagist](https://camo.githubusercontent.com/99a10c7088bb0b36077d6f02018c4ebc80ddf00a719cda6cda94d0221d6bb8e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6465762d73616a69642f6c61726176656c2d6d6f64756c61722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dev-sajid/laravel-modular)[![Total Downloads](https://camo.githubusercontent.com/127d2558420c389c34f8df4ac882b40ba1b511eda048b659630fdee72d9f6c98/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6465762d73616a69642f6c61726176656c2d6d6f64756c61722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dev-sajid/laravel-modular)[![MIT Licensed](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Lightweight module system for Laravel 11+ applications. Drop modules under `modules/{Name}` and they are auto-discovered with zero configuration.

Features
--------

[](#features)

- 🚀 **Zero Dependencies**: No external packages required
- 🔍 **Auto-Discovery**: Modules are automatically discovered and registered
- 📦 **Convention-based**: Follow simple naming conventions for instant setup
- 🎯 **Laravel 11+ Compatible**: Built for modern Laravel applications
- 🛠️ **Artisan Integration**: Generate modules with `php artisan make:module`
- 📁 **Flexible Structure**: Support for routes, views, migrations, config, translations, and more
- ⚡ **High Performance**: Lightweight with minimal overhead

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Laravel 11.0 or higher

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require dev-sajid/laravel-modular
```

The package will auto-register thanks to Laravel's package auto-discovery.

Quick Start
-----------

[](#quick-start)

1. **Generate a module:**

    ```
    php artisan make:module Blog
    ```
2. **Your module structure:**

    ```
    modules/
    └── Blog/
        ├── BlogServiceProvider.php
        ├── Http/
        │   └── Controllers/
        │       └── BlogController.php
        ├── routes/
        │   └── web.php
        ├── resources/
        │   └── views/
        │       └── index.blade.php
        ├── Database/
        │   └── migrations/
        │       └── 2025_08_24_000000_create_blogs_table.php
        └── lang/

    ```
3. **Run migrations:**

    ```
    php artisan migrate
    ```
4. **Access your module:**Visit `/blog` in your browser!

Configuration
-------------

[](#configuration)

Publish the configuration file (optional):

```
php artisan vendor:publish --tag=modular-config
```

This creates `config/modular.php`:

```
