2017 © Pedro Peláez
 

library slim-handlebars-view

Handlebars View for Slim Framework

image

mattmezza/slim-handlebars-view

Handlebars View for Slim Framework

  • Monday, April 3, 2017
  • by mattmezza
  • Repository
  • 1 Watchers
  • 0 Stars
  • 30 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Slim Framework Handlebars View

Build Status, (*1)

This is a Slim Framework view helper built on top of the Handlebars templating component. You can use this component to create and render templates in your Slim Framework application. It works with handlebars.php by xamin project., (*2)

Install

Via Composer, (*3)

$ composer require mattmezza/slim-handlebars-view

Requires Slim Framework 3 and PHP 5.5.0 or newer., (*4)

Usage

// Create Slim app
$app = new \Slim\App();

// Fetch DI Container
$container = $app->getContainer();

// Register Twig View helper
$container['view'] = new \Slim\Views\Handlebars(
    'path/to/templates',
    'partials',
    [
        'extension' => 'hbs' // default is html
    ]);

// Define named route
$app->get('/hello/{name}', function ($request, $response, $args) {
    return $this->view->render($response, 'profile', [
        'name' => $args['name']
    ]);
})->setName('profile');

// Run app
$app->run();

Testing

phpunit

Contributing

Please see CONTRIBUTING for details., (*5)

Credits

License

The MIT License (MIT). Please see License File for more information., (*6)

The Versions

03/04 2017

dev-master

9999999-dev https://github.com/mattmezza/slim-handlebars-view

Handlebars View for Slim Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

templating extensions handlebars slim slimphp slimframework

03/04 2017

1.1.1

1.1.1.0 https://github.com/mattmezza/slim-handlebars-view

Handlebars View for Slim Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

templating extensions handlebars slim slimphp slimframework

22/03 2017

1.1

1.1.0.0 https://github.com/mattmezza/slim-handlebars-view

Handlebars View for Slim Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

templating extensions handlebars slim slimphp slimframework

22/03 2017

1.0

1.0.0.0 https://github.com/mattmezza/slim-handlebars-view

Handlebars View for Slim Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

templating extensions handlebars slim slimphp slimframework