How to implement HMVC in Laravel 4
Asked Answered
C

3

7

Does laravel 4 have built in support for hmvc or are there bundles for this functionality? What is the best way to use HMVC in laravel 4.

Cowlick answered 3/7, 2013 at 4:9 Comment(3)
Maybe this is helpful bundles.laravel.com/bundle/hmvcScofflaw
Just noticed that bundle is for Laravel 3. It's not been updated on Github for about a year. I've found this docs.cartalyst.com/api which looks like an option if you are willing to pay.Scofflaw
Generally HMVC normally means you need to refactor whatever it is you're doing. If code in a controller needs to be called from multiple controllers then abstract it out into a service or model. Of course, without knowing exactly what you're trying to achieve it's hard to say if this will apply to you.Wyler
M
5

This tutorial shows you how to implement modules in laravel 4 http://creolab.hr/2013/05/modules-in-laravel-4/

Marielamariele answered 3/7, 2013 at 8:15 Comment(0)
C
2

Here is one more hmvc option, https://github.com/LevareCMS/modulemanager

If you come from codeigniter, you may like this, http://forums.laravel.io/viewtopic.php?id=8664

Also is worth mentioning, depending on your needs, a view composer may achieve what you want.

Cavorilievo answered 4/7, 2013 at 0:16 Comment(0)
A
1

It was implemented with laravel 4 in HMVC. You can clone at: https://github.com/ReyzWB/Laravel-4-Modular-Approach

Armure answered 25/8, 2013 at 3:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.