2017 © Pedro Peláez
 

library slim-blade-view

Slim Framework 3 view helper built on the Blade component

image

hiropeke/slim-blade-view

Slim Framework 3 view helper built on the Blade component

  • Tuesday, July 4, 2017
  • by hiropeke
  • Repository
  • 6 Watchers
  • 10 Stars
  • 300 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 4 Forks
  • 2 Open issues
  • 5 Versions
  • 15 % Grown

The README.md

Slim-Blade-View

Build Status License: MIT, (*1)

This is a Slim Framework view helper built on top of the Blade component., (*2)

You can use this component to create and render templates in your Slim Framework application., (*3)

Install

Via Composer, (*4)

$ composer require rubellum/slim-blade-view

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

Usage

// Slim Settings
$config = [
    'settings' => [
        'displayErrorDetails' => true, // set to false in production

        // Renderer settings
        'renderer'            => [
            'blade_template_path' => 'path/to/views', // String or array of multiple paths
            'blade_cache_path'    => 'path/to/cache', // Mandatory by default, though could probably turn caching off for development
        ],
    ],
];

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

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

// Register Blade View helper
$container['view'] = function ($container) {
    return new \Slim\Views\Blade(
        $container['settings']['renderer']['blade_template_path'],
        $container['settings']['renderer']['blade_cache_path']
    );
};

// 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

License

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

The Versions

04/07 2017

dev-feature/add-directive

dev-feature/add-directive

Slim Framework 3 view helper built on the Blade component

  Sources   Download

MIT

The Requires

 

The Development Requires

by Hiroaki Matsuura

framework template blade renderer slim view

11/01 2017

dev-master

9999999-dev

Slim Framework 3 view helper built on the Blade component

  Sources   Download

MIT

The Requires

 

The Development Requires

by Hiroaki Matsuura

framework template blade renderer slim view

11/01 2017

dev-fix-document-and-tests

dev-fix-document-and-tests

Slim Framework 3 view helper built on the Blade component

  Sources   Download

MIT

The Requires

 

The Development Requires

by Hiroaki Matsuura

framework template blade renderer slim view

11/03 2016

0.1.1

0.1.1.0

Slim Framework 3 view helper built on the Blade component

  Sources   Download

MIT

The Requires

 

The Development Requires

by Hiroaki Matsuura

framework template blade renderer slim view

10/03 2016

0.1

0.1.0.0

Slim Framework 3 view helper built on top of the Blade component

  Sources   Download

MIT

The Requires

 

The Development Requires

by Hiroaki Matsuura

framework template blade renderer slim view