PHP code example of evan-li / think-blade

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

    

evan-li / think-blade example snippets


return [

    // 模板引擎类型 支持 php think 支持扩展
    'type'         => 'Blade',
    // 视图基础目录(集中式)
    'view_base'   => '',
    // 是否开启模板编译缓存,设为false则每次都会重新编译
    'tpl_cache'          => true,
    // 模板起始路径
    'view_path'   => '',
    'tpl_begin'   => '{{',
    'tpl_end'   => '}}',
    'tpl_raw_begin'   => '{!!',
    'tpl_raw_end'   => '!!}',
    'view_cache_path'   =>  Env::get('runtime_path') . 'temp' . DIRECTORY_SEPARATOR, // 模板缓存目录
    // 模板文件后缀
    'view_suffix' => 'blade.php',

];