Laravel Blade implementation of PhpTransformer.

1.0.1 2017-10-05 19:30 UTC

This package is auto-updated.

Last update: 2024-10-16 23:24:54 UTC


README

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.