PHPackages                             raza9798/laravel-core-modules - 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. raza9798/laravel-core-modules

ActiveLibrary

raza9798/laravel-core-modules
=============================

Laravel package for modular development, providing a structured approach to organizing models, controllers, migrations, and policies under a clean namespace like Core/. It simplifies scaffolding and enhances code separation for improved project structure.

1.0.4(1mo ago)010↓66.7%MITPHPPHP ^8.2|^8.3

Since Jul 14Pushed 1mo agoCompare

[ Source](https://github.com/Raza9798/laravel-core-modules)[ Packagist](https://packagist.org/packages/raza9798/laravel-core-modules)[ RSS](/packages/raza9798-laravel-core-modules/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

**laravel-core-modules** package.

---

📦 Laravel Core Modules
======================

[](#-laravel-core-modules)

A lightweight Laravel package to generate and manage **modular application structure** using Artisan-based scaffolding.

It helps you organize Laravel applications into feature-based modules containing:

- Controllers
- Models
- Migrations
- Seeders
- Factories
- Requests
- Policies

---

🚀 Installation
==============

[](#-installation)

1. Install via Composer
-----------------------

[](#1-install-via-composer)

```
$ composer require raza9798/laravel-core-modules
$ php artisan core-modules:install
```

---

2. Register Service Provider (if auto-discovery is disabled)
------------------------------------------------------------

[](#2-register-service-provider-if-auto-discovery-is-disabled)

```
// config/app.php

'providers' => [
    Raza9798\LaravelCoreModules\CoreModulesServiceProvider::class,
],
```

---

3. Setup Modules Autoload (IMPORTANT)
-------------------------------------

[](#3-setup-modules-autoload-important)

Add this to your Laravel application's `composer.json`:

```
"autoload": {
    "psr-4": {
        "App\\": "app/",
        "Modules\\": "Modules/"
    }
}
```

Then run:

```
composer dump-autoload
```

---

⚙️ Configuration (Optional)
===========================

[](#️-configuration-optional)

Publish config file:

```
php artisan vendor:publish --tag=laravel-core-modules-config
```

---

📁 Default Module Structure
==========================

[](#-default-module-structure)

When a module is created:

```
Modules/
└── Inventory/
    ├── app/
    │   ├── Http/
    │   │   └── Controllers/
    │   ├── Models/
    │   ├── Policies/
    ├── database/
    │   ├── migrations/
    │   ├── seeders/
    │   ├── factories/
    ├── routes/
    ├── tests/
    │   ├── Feature/
    │   ├── Unit/

```

---

🧑‍💻 Available Commands
======================

[](#‍-available-commands)

---

📌 Create Module
---------------

[](#-create-module)

```
php artisan module:create {name}
```

### Example:

[](#example)

```
php artisan module:create Inventory
```

---

📌 Generate Module Files
-----------------------

[](#-generate-module-files)

```
php artisan module:make
```

### Flow:

[](#flow)

- Select existing module OR create new one
- Select artifact preset
- Generate required files

---

📌 Artifact Options
------------------

[](#-artifact-options)

When running `module:make`:

```
Select artifacts to generate:

✔ API Resource
✔ Database
✔ Custom

```

---

### API Resource generates:

[](#api-resource-generates)

- Controller
- Model
- Migration
- Seeder
- Factory

---

### Database generates:

[](#database-generates)

- Model
- Migration
- Seeder
- Factory

---

### Custom generates:

[](#custom-generates)

- Controller
- Model
- Migration
- Seeder
- Factory
- (More coming)

---

🧪 Example Usage
===============

[](#-example-usage)

Step 1: Create a module
-----------------------

[](#step-1-create-a-module)

```
php artisan module:create Inventory
```

---

Step 2: Generate files inside module
------------------------------------

[](#step-2-generate-files-inside-module)

```
php artisan module:make
```

Example flow:

```
Select module:
> Inventory

Select artifacts:
> API Resource

Enter name:
> ItemMaster

```

---

Result:
-------

[](#result)

```
Modules/Inventory/
├── app/Http/Controllers/ItemMasterController.php
├── app/Models/ItemMaster.php
├── database/migrations/...
├── database/seeders/...

```

---

⚠️ Important Notes
==================

[](#️-important-notes)

- Requires PSR-4 autoloading for `Modules\` namespace
- Run `composer dump-autoload` after setup
- Laravel base controller may be used inside modules

---

Artisan Commands Summary
========================

[](#artisan-commands-summary)

```
php artisan module -h

```

🤝 Contributing
==============

[](#-contributing)

Feel free to fork and improve the package.

---

📜 License
=========

[](#-license)

MIT License © Raza9798

---

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance93

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

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

Every ~3 days

Total

5

Last Release

33d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/59387235?v=4)[Mohamed Raza](/maintainers/Raza9798)[@Raza9798](https://github.com/Raza9798)

---

Top Contributors

[![Raza9798](https://avatars.githubusercontent.com/u/59387235?v=4)](https://github.com/Raza9798 "Raza9798 (7 commits)")

---

Tags

laravelscaffoldingpackagecoredevelopmentmodulesstructuremodularorganization

### Embed Badge

![Health badge](/badges/raza9798-laravel-core-modules/health.svg)

```
[![Health](https://phpackages.com/badges/raza9798-laravel-core-modules/health.svg)](https://phpackages.com/packages/raza9798-laravel-core-modules)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.1k6.4M361](/packages/laravel-ai)[psalm/plugin-laravel

Psalm plugin for Laravel

3365.5M359](/packages/psalm-plugin-laravel)[erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React/Svelte) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.

6036.2k](/packages/erag-laravel-lang-sync-inertia)[ublabs/blade-simple-icons

A package to easily make use of Simple Icons in your Laravel Blade views.

1868.9k](/packages/ublabs-blade-simple-icons)[rcv/core

Enterprise-Grade Modular Architecture for Laravel Applications - A powerful Laravel package that revolutionizes application development with robust Service Repository Pattern, Dynamic Module Management, and 50+ Artisan commands for scalable, maintainable applications.

131.9k](/packages/rcv-core)

PHPackages © 2026

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