PHP code example of sura / view
1. Go to this page and download the library: Download sura/view library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sura / view example snippets
use Sura\View\View;
$views = __DIR__ . '/views';
$cache = __DIR__ . '/cache';
$blade = new View($views,$cache,View::MODE_DEBUG); // MODE_DEBUG allows to pinpoint troubles.
echo $blade->run("hello",array("variable1"=>"value1")); // it calls /views/hello.blade.php