trieunb / modules
A package module of team ans-asia build for dev
Installs: 1 744
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 0
Open Issues: 0
Type:package
pkg:composer/trieunb/modules
Requires
- php: >=5.6
- laravel/framework: >=5.1
This package is not auto-updated.
Last update: 2025-10-31 08:21:58 UTC
README
This package gives you the ability to use Laravel 5 with module system.
You can simply drop or generate modules with their own controllers, models, views and a routes file into the app/Modules folder and go on working with them.
Documentation
Installation
The best way to install this package is through your terminal via Composer.
Run the following command from your projects root
composer require "trieunb/modules @dev"
Once this operation is complete, simply add the service provider to your project's config/app.php and you're done.
Service Provider
Trieunb\Modules\ModuleServiceProvider::class,
Getting started
The built in Artisan command php artisan make:module name generates a ready to use module in the app/Modules folder and a migration if necessary.
This is how the generated module would look like:
laravel-project/
app/
└── Modules/
└── Demo/
├── Controllers/
│ └── DemoController.php
├── Models/
│ └── Demo.php
├── Views/
│ └── index.blade.php
└── routes.php
Usage
The generated RESTful Resource Controller and the corresponding routes.php make it easy to dive in. In my example you would see the output from the Modules/Demo/Views/index.blade.php when you open laravel-project:8000/demo in your browser.
License
modules is licensed under the terms of the MIT License (See LICENSE file for details).