How to make HMVC In Laravel 5?
Asked Answered
F

1

12

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.

Flinty answered 9/6, 2015 at 15:31 Comment(2)
github.com/caffeinated/modulesDaisy
Please follow below link to get the correct answer. How to make HMVC structure in laravel 5Opulent
R
9

You can achieve this by using namespaces and grouping routes. Look at my screenshot:

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

Repeat answered 10/6, 2015 at 5:39 Comment(3)
i have installed Laravel 5 but i am watching tutorials of Laravel 4 so can i run laravel 4's command in Laravel 5??Migrant
if You mean artisan commands to generate controllers and etc. - YES, it's same.Repeat
I get whatever I wantFlinty

© 2022 - 2024 — McMap. All rights reserved.