I have finished my previous project in yii2. Now, I'm currently working on laravel 5. I am new to laravel 5. I have googled about HMVC in laravel but I haven't found an appropriated answer (ie package) on Laravel. In Yii2 it provided by default .But I have not found in Laravel .Please suggest me How I work moduler way in Laravel 5.
Asked
Active
Viewed 9,899 times
12
-
https://github.com/caffeinated/modules – Ezequiel Moreno Jun 09 '15 at 16:30
-
Please follow below link to get the correct answer. [How to make HMVC structure in laravel 5](https://stackoverflow.com/questions/30639577/how-to-make-hmvc-structure-in-laravel-5/47199218#47199218) – Sitesh Ranjan Oct 18 '19 at 12:36
1 Answers
9
You can achieve this by using namespaces and grouping routes. Look at my screenshot:
As You can see I've 2 top level namespaces: Panel
, Site
.
It's not problem to make controllers with namespace SomeApp
, SomeAnotherApp
and group their routes. using Route::group
.
also read this discussion: https://laracasts.com/discuss/channels/requests/multiple-modules-in-laravel-5?page=1

num8er
- 18,604
- 3
- 43
- 57
-
i have installed Laravel 5 but i am watching tutorials of Laravel 4 so can i run laravel 4's command in Laravel 5?? – Bilal Maqsood Jun 10 '15 at 06:05
-
if You mean artisan commands to generate controllers and etc. - YES, it's same. – num8er Jun 10 '15 at 06:25
-
2