Skip to content

phptransformers/blade

Repository files navigation

Blade for PHPTransformers

Laravel Blade support for PHPTransformers.

Install

Via Composer

$ composer require phptransformers/blade

Usage

$engine = new BladeTransformer();
echo $engine->render('Hello, {{ $name }}!', array('name' => 'phptransformers'));

Options

$engine = new BladeTransformer(array(
    'cache-dir' => 'path/to/the/cache', // Default to the system temporary directory
));

// ...

$blade = new Illuminate\View\Compilers\BladeCompiler(
    new Illuminate\Filesystem\Filesystem(),
    sys_get_temp_dir()
);
$engine = new BladeTransformer(array(
    'blade' => $blade
));

Testing

$ composer test

License

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