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.

Sakibul Alam
  • 1,731
  • 2
  • 21
  • 40
  • 1
    Maybe this is helpful http://bundles.laravel.com/bundle/hmvc – naththedeveloper Jul 03 '13 at 07:17
  • Just noticed that bundle is for Laravel 3. It's not been updated on [Github](https://github.com/kbanman/laravel-hmvc) for about a year. I've found this http://docs.cartalyst.com/api which looks like an option if you are willing to pay. – naththedeveloper Jul 03 '13 at 07:50
  • 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. – Jason Lewis Jul 03 '13 at 09:34

3 Answers3

5

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

Thomas Clarkson
  • 755
  • 9
  • 11
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.

user2094178
  • 9,204
  • 10
  • 41
  • 70
1

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

Shrey Gupta
  • 5,509
  • 8
  • 45
  • 71