PHP code example of penobit / blade

1. Go to this page and download the library: Download penobit/blade 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/ */

    

penobit / blade example snippets


use Penobit\Blade\Blade;

$blade = new Blade('viewsDirectory', 'cacheDirectory');

echo $blade->make('homepage', ['author' => 'Penobit', 'variable2' => 'variable value'])->render();

echo $blade->render('homepage', ['author' => 'Penobit', 'variable2' => 'variable value']);

$blade->directive('datetime', function ($expression) {
    return " echo date('Y-m-d H:i', {$expression});