This package is abandoned and no longer maintained. The author suggests using the 50onred/laravel-blade package instead.

Use the simple and yet powerful Laravel Blade templating engine as a standalone component.

1.0.2 2017-07-03 12:59 UTC

This package is auto-updated.

Last update: 2022-02-01 12:39:30 UTC



Use Laravel's blade outside Laravel

This package is a slightly modified version of 50onred/laravel-blade.

Latest Version on Packagist Software License


composer require spatie/laravel-blade


You're free to use this package (it's MIT-licensed), but if it makes it to your production environment you are required to send us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Samberstraat 69D, 2060 Antwerp, Belgium.

The best postcards will get published on the open source page on our website.



| Register The Auto Loader
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.

require 'vendor/autoload.php';

use Spatie\Blade\Blade;

$views = __DIR__ . '/views';
$cache = __DIR__ . '/cache';

$blade = new Blade($views, $cache);
echo $blade->view()->make('hello');

You can use all blade features as described in the Laravel 4 documentation: