d35k/laravelmodules is a Laravel package for modular pattern for laravel 5.
It currently has 0 GitHub stars and 13 downloads on Packagist.
Install it with composer require d35k/laravelmodules.
Discover more Laravel packages by d35k
or browse all Laravel packages to compare alternatives.
Last updated
Modular Pattern & Module Management for Laravel 5
The best way to install this package is through your terminal via Composer.
Add the following line to the composer.json file and fire composer update
"d35k/laravelmodules": "dev-master"
Once this operation is complete, simply add the service provider to your project's config/app.php
d35k\laravelmodules\ModuleServiceProvider::class,
The built in Artisan command php artisan make:module name [--no-migration] [--no-translation] generates a ready to use module in the app/Modules folder and a migration if necessary.
laravel-project/
app/
|-- Modules/
|-- FooBar/
|-- Controllers/
|-- FooBarController.php
|-- FooBarApiController.php
|-- FooBarAdminController.php
|-- Models/
|-- FooBar.php
|-- Views/
|-- default/
|-- index.blade.php
|-- admin/
|-- index.blade.php
|-- api/
|-- index.blade.php
|-- Translations/
|-- en/
|-- general.php
|-- tr/
|-- general.php
|-- routes.php
|-- helper.php
|-- details.php
Getting to module config file and generators:
php artisan vendor:publish
Files
laravel-project/
config/
|-- modulemanagement.php
app/
|-- BaseHelpers.php
|-- Http/
|-- Controllers/
|-- AdminTemplateController.php
|-- MainTemplateController.php
|-- AdminController.php
|-- MainController.php
Based on L5 Modular, thanks to Artem Schander.