Blade Use Laravel Blade templates as a standalone component without the full Laravel framework

Getting Started

Instance

Static

Directives

Directives

View the API Documentation for this class

This library extends the standard Blade syntax with a few custom Directives.

These are handled by the Directives class, and you can provide your own custom instance by implementing the DirectivesInterface:

use duncan3dc\Laravel\BladeInstance;
use duncan3dc\Laravel\Directives;

$directives = new Directives;

$blade = new BladeInstance("/var/www/views", "/var/www/cache/views", $directives);

You can also use this extra functionality inside the Laravel framework. Just pass your Laravel Blade instance to the registerDirectives() method, like so:

(new duncan3dc\Laravel\Directives)->register(\App::make("blade"));

The Directives class was introduced in version 4.1.0