team-optimus / modularavel
A laravel 5|6 package to create a better house keeping of modules.
This package is auto-updated.
Last update: 2025-04-11 23:19:25 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 create necessary files you need in 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 course! you can change the path of each files via package configuration.
Installation
Execute the following command to get the latest version of the package:
composer require team-optimus/modularavel
Optionally, In your config/app.php
add TeamOptimus\Modularavel\Providers\ModularServiceProvider::class
to the end of the providers
array:
'providers' => [
...
TeamOptimus\Modularavel\Providers\ModularServiceProvider::class,
],
Go to App\Provider\RouteServiceProvider
and change the $namespace
property to
`php
protected $namespace = 'App';
`
Publish Configuration
php artisan vendor:publish --provider="TeamOptimus\Modularavel\Providers\ModularServiceProvider"
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.