PHP code example of hunteryun / blade

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

    

hunteryun / blade example snippets




 use Hunter\Engine\BladeEngine;
 
 $path = ['/view_path'];         // your view file path, it's an array
 $cachePath = '/cache_path';     // compiled cache file path

 $engine = new BladeEngine($path, $cachePath);
 $variables['name'] = 'Drupal Hunter';

 return $engine->setTemplate('hello.html')->setParameters($variables)->render('hello.html', $variables);