PHP code example of moazamin6 / creative-blade

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

    

moazamin6 / creative-blade example snippets




use CreativeBlade\CreativeBlade;

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

$blade = new CreativeBlade($views, $cache);

echo $blade->view()->make('demo', ['message' => 'This is Creative Blade']);

$ci = &get_instance();
$blade = new CreativeBlade($views, $cache,$ci);

$blade->compiler()->directive('datetime', function ($expression) {
    return " echo with({$expression})->format('F d, Y g:i a');