team-optimus / l5-modular
A laravel package to create a better house keeping of modules.
This package is auto-updated.
Last update: 2025-04-10 18:58:28 UTC
README
Description
A laravel package to create a better house keeping of modules. It helps the developer to make a module in easiest way as possible. In one command, it will all the files you need for each module and it is presented as follow:
laravel/
app/
└── Modules/
└── YourClass/
├── Controllers/
│ └── YourClassController.php
├── Models/
│ └── YourClass.php
├── Repositories/
│ └── YourClassRepository.php
└── Requests/
└── YourClassRequests.php
and of couse! you can change the path of each files.
Installation
Execute the following command to get the latest version of the package:
composer require team-optimus/l5-modular
In your config/app.php
add TeamOptimus\L5Modular\Providers\L5ModularServiceProvider::class
to the end of the providers
array:
'providers' => [
...
TeamOptimus\L5Modular\Providers\L5ModularServiceProvider::class,
],
Go to App\Provider\RouteServiceProvider
and change the $namespace
property to
`php
protected $namespace = 'App';
`
Publish Configuration
php artisan vendor:publish --provider="TeamOptimus\L5Modular\Providers\L5ModularServiceProvider"
Usage
Creating a complete modular housekeeped files.
php artisan make:modular Post
Creating a single file.
php artisan make:mod-controller Post
php artisan make:mod-repository Post
php artisan make:mod-request Post
Appending route samples.
php artisan modular:route Post
Troubleshooting
None for now.