How to make HMVC structure in laravel 5 [closed]

巧了我就是萌 提交于 2020-03-06 03:50:14

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/30639577/how-to-make-hmvc-structure-in-laravel-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!