stackkit/blade-standalone

1.1.0 2018-10-17 20:11 UTC

README

This package is a standalone version of Laravel Blade.

Usage

<?php

use Stackkit\BladeStandalone\Blade;

require 'vendor/autoload.php';

$blade = new Blade(
    __DIR__ . DIRECTORY_SEPARATOR . 'views',
    __DIR__ . DIRECTORY_SEPARATOR . 'cache'
);

$contents = $blade->render('welcome', ['name' => 'John Doe']);

echo $contents;