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

ActiveLibrary[Framework](/categories/framework)

mhannan-dev/sparktro-laravel-modular
====================================

A modular system for Laravel apps

v1.0.0(9mo ago)0108MITPHPPHP ^8.2

Since Aug 2Pushed 9mo agoCompare

[ Source](https://github.com/mhannan-dev/sparktro-laravel-modular)[ Packagist](https://packagist.org/packages/mhannan-dev/sparktro-laravel-modular)[ RSS](/packages/mhannan-dev-sparktro-laravel-modular/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Here’s an **updated and polished version** of your `README.md` for the **Sparktro Laravel Modular** package, ensuring better clarity, structure, and professionalism:

---

🚀 Sparktro Laravel Modular
==========================

[](#-sparktro-laravel-modular)

A clean and scalable **modular system** for Laravel applications. This package provides a simple yet powerful way to structure your Laravel app using **module-based architecture**, making it easier to maintain and extend — ideal for large or enterprise-level applications.

---

✨ Features
----------

[](#-features)

- 🧱 Modular code organization
- ⚙️ Automatic loading of routes, views, migrations per module
- 📦 PSR-4 autoloading and Laravel auto-discovery supported
- 🧩 Artisan commands to scaffold modules and components
- 🔐 Supports loading custom middleware like `auth`, etc.
- 🏗️ Ideal for large, multi-team, enterprise Laravel apps

---

📦 Installation
--------------

[](#-installation)

```
composer require mhannan-dev/sparktro-laravel-modular
```

> ✅ Laravel’s package auto-discovery will take care of registration.

---

⚙️ Middleware Setup
-------------------

[](#️-middleware-setup)

If your modules need to use `auth` or other middlewares, make sure to load them in each module's `Providers` class within the `boot()` method.

```
public function boot()
{
    $this->loadRoutesFrom(__DIR__ . '/../Routes/web.php');
    $this->loadViewsFrom(__DIR__ . '/../Views', 'ModuleAlias');
    $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');

   \Illuminate\Support\Facades\Route::middleware(['web', 'auth'])
            ->group(__DIR__ . '/../Routes/web.php');
}
```

---

🧪 Artisan Commands
------------------

[](#-artisan-commands)

The package includes several custom Artisan commands for quick scaffolding:

CommandDescription`php artisan module:make ModuleName`Create a new module`php artisan module:migrate ModuleName`Run migrations for a specific module`php artisan module:make-controller ModuleName ControllerName`Create a controller inside the module`php artisan module:make-model ModuleName ModelName -m`Create a model and optional migration`php artisan module:make-request ModuleName RequestName`Create a form request in the module`php artisan module:make-migration ModuleName MigrationName`Create a new migration file in the module> Example usage:
>
> ```
> php artisan module:make Blog
> php artisan module:make-controller Blog PostController
> php artisan module:migrate Blog
> ```

---

📂 PSR-4 Autoloading
-------------------

[](#-psr-4-autoloading)

Each module follows **PSR-4 autoloading** standards. No need for manual inclusion—just ensure your namespaces match directory structures.

---

🧪 Testing
---------

[](#-testing)

Automated tests and example module usage will be added in upcoming releases.

---

📝 License
---------

[](#-license)

This package is open-sourced under the [MIT license](LICENSE).

---

👨‍💻 Author
----------

[](#‍-author)

**Muhammad Hannan**[GitHub](https://github.com/mhannan-dev) | [LinkedIn](https://www.linkedin.com/in/mhannan44)📧

---

🤝 Contributing
--------------

[](#-contributing)

Contributions, issues, and feature requests are welcome! Please open a discussion or issue first for major changes.

---

Would you like a sample demo module created to include in the repo? I can help generate that too.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance57

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

284d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/79f0209b76868cdd90f3e66e1ccf34f8b20a83515f702b817959dee4524b3aed?d=identicon)[mhannan-dev](/maintainers/mhannan-dev)

---

Top Contributors

[![mhannan-dev](https://avatars.githubusercontent.com/u/19702064?v=4)](https://github.com/mhannan-dev "mhannan-dev (7 commits)")

---

Tags

laravelpackagelaravel-packagemodulesmodular

### Embed Badge

![Health badge](/badges/mhannan-dev-sparktro-laravel-modular/health.svg)

```
[![Health](https://phpackages.com/badges/mhannan-dev-sparktro-laravel-modular/health.svg)](https://phpackages.com/packages/mhannan-dev-sparktro-laravel-modular)
```

###  Alternatives

[internachi/modular

Modularize your Laravel apps

1.1k662.4k8](/packages/internachi-modular)

PHPackages © 2026

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