papajoker / Hmvc by papajoker

Laravel 4 pakage for uses controllers-views in a architectural Hmvc
25
0
3
Package Data
Maintainer Username: papajoker
Package Create Date: 2013-06-29
Package Last Update: 2013-06-29
Language: PHP
License: MIT
Last Refreshed: 2024-11-23 03:17:55
Package Statistics
Total Downloads: 25
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 3
Total Forks: 0
Total Open Issues: 0

Hmvc

A Laravel 4 pakage for uses controllers-views in a architectural Hmvc. Reuse your controllers(include module) in multiple views (built in views)

Installation

Installing Hmvc is simple. First, you can add the package to the require attribute of your composer.json file.

{
    "require": {
        "papajoker/hmvc": "@master"
    },
}

In console run composer(.phar) update papajoker/hmvc:master

In console run php artisan dump autoload

Add 'Papajoker\Hmvc\HmvcServiceProvider', to the list of service providers in /app/config/app.php

usage

create your hmvc file in /app/views/

return array(
    'controller' => 'RssController', 	// your controller in app/controllers/ or package/controller
    'action' => 'index',				// method controller
    									// attr pass as parameters in action
    'attr' => array( 					// can overwrite in blade view with @include ('.hmvc',$attr)
	'url' =>    'http://www.planet-php.fr/rss.php',
	'max' => 12
	)
);

in your blade views :

@section('content')
   <h4>test a rss built in my page as hmvc</h4>
   <div class="rss" width="45%">
      	@include ( 'myrss' , array('max'=>4) ) <!-- myrss.hmvc -->
   </div>
@stop

exemple

in /exemple/ you have a small rss

And voila! You can use the Hmvc.