Resource icon

Laravel Blade In PHP App 2.0.0

No permission to download

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Installation​


composer require tahaghafuri/blade

Usage​


<?php

/*
|--------------------------------------------------------------------------
| 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 __DIR__.'/vendor/autoload.php';

use TAG\Blade\Blade;

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

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

You can use all blade features as described in the Laravel Documentation:https://laravel.com/docs/master/blade
Back
Top