2017 © Pedro Peláez
 

library hmvc

Laravel 4 pakage for uses controllers-views in a architectural Hmvc

image

papajoker/hmvc

Laravel 4 pakage for uses controllers-views in a architectural Hmvc

  • Saturday, June 29, 2013
  • by papajoker
  • Repository
  • 2 Watchers
  • 0 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Hmvc

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

Installation

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

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

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

In console run php artisan dump autoload, (*4)

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

usage

create your hmvc file in /app/views/, (*6)

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 :, (*7)

@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, (*8)

And voila! You can use the Hmvc., (*9)

The Versions

29/06 2013

dev-master

9999999-dev

Laravel 4 pakage for uses controllers-views in a architectural Hmvc

  Sources   Download

MIT

The Requires

 

by Avatar papajoker

laravel hmvc