sarvarov / laravel-modules
Lightweight assistant for implementing modular architecture in Laravel.
Installs: 48
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
pkg:composer/sarvarov/laravel-modules
README
Lightweight assistant for implementing modular architecture in Laravel.
app
- Modules
- - Page
- - - Controllers
- - - Migrations
- - - Translations
- - - Views
- - - Routes
- - - Models
Installation
composer require sarvarov/laravel-modules- php artisan
vendor:publish --provider="Sarvarov\LaravelModules\ModuleServiceProvider". - In
config/modules.phpadd your created modules inlistparameter, for example:
'list' => [
'BlogPost' => [
'prefix' => 'blog-post',
'routes' => ['web'],
],
],
In example above it will load routes from app/Modules/Frontend/Page/Routes/web.php. \Route::get('/', 'PageController@index'); will route to app/Modules/Frontend/Page/Controllers/PageController.