gluephp/glue-plates

Use leage/plates templating engine in Glue

0.1.2 2016-12-30 05:03 UTC

This package is not auto-updated.

Last update: 2024-05-08 22:49:45 UTC


README

Use leauge/plates with gluephp/glue

Installation

Use Composer:

$ composer require gluephp/glue-plates

Configure Plates

$app = new Glue\App;

$app->config->override([
    'plates' => [
        'path'    => '/absolute/path/to/templates/folder',
    ],
]);

Register Plates

$app->register(
    new Glue\Plates\ServiceProvider()
);

Get the Plates instance

Once the service provider is registered, you can fetch the Plates instance with:

$plates = $app->make('League\Plates\Engine');

or use the alias:

$plates = $app->plates;