I am building a big project in laravel 5 for this I want to use modular approach, I don't know how to implement hmvc structure in laravel 5.
For building modular Laravel 5 app, you can use this package- Laravel Modules - Pingpong labs
This package provides an excellent way to create modules and then controllers, requests, models for created modules, with relevant artisan commands.
The documentation contains excellent installation guide to help you to get started.
The best way to install this package is through your terminal via Composer.
Run the following command from your projects root
composer require artem-schander/l5-modular
Once this operation is complete, simply add the service provider to your project's config/app.php and you're done.
Service Provider
ArtemSchander\L5Modular\ModuleServiceProvider::class,
Getting started
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/translation if necessary.
© 2022 - 2024 — McMap. All rights reserved.