Download the PHP package khaledneam/module-generator without Composer
On this page you can find all versions of the php package khaledneam/module-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download khaledneam/module-generator
More information about khaledneam/module-generator
Files in khaledneam/module-generator
Package module-generator
Short Description A Laravel package to generate module structures.
License MIT
Informations about the package module-generator
Laravel Module Generator
A Laravel package to quickly generate modular components such as Controllers, Models, Views, Repositories, and Services. This package helps in creating a modular structure in Laravel applications, making the code more organized and manageable.
Features
- Create directories for Controllers, Models, Requests, Routes, Views, Migrations, Tests, Providers, Repositories, and Services.
- Generate Service Providers, Controllers, Views, Routes, Repositories, and Services files with basic templates.
- Automatically register the Service Provider in
config/app.php
. - Automatically include module routes in
routes/web.php
. - Update
helpers.php
file to includemodule_path
function.
Installation
-
Install the package via Composer:
- Ensure you also add the Modules directory in the root of your Laravel project
- If you do not have helpers.php in your app directory, create it as an empty file
- Update composer.json
Then, update Composer’s autoload files:
Usage To create a new module, use the following Artisan command:
Example
This will create a new module named Blog with the following structure:
Generated Files
Important Notes
1.Register the Service Provider:
Ensure that you add the newly created module's service provider to the providers array in config/app.php:
Contributing `