PHP code example of qq958691165 / tp3-lara-blade

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

    

qq958691165 / tp3-lara-blade example snippets


use Tp3LaraBlade\Library\BladeView;

class AbstractController extends \Think\Controller {
    public function __construct()
    {
        parent::__construct();
        $this->view=BladeView::instance();
    }
}

class IndexController extends AbstractController{
    public function index(){
        $this->msg='123456';
//        $str=$this->fetch();
//        dump($str);
        $this->display();
    }
}

return [
    //...
    'TMPL_ENGINE_TYPE'=>'blade',
    'TMPL_TEMPLATE_SUFFIX'=>'.blade.php',
    //...
];

C('TMPL_ENGINE_TYPE','blade');
C('TMPL_TEMPLATE_SUFFIX','.blade.php');

\Tp3LaraBlade\RegisterContainer::registerNamespace('Admin',APP_DIR.'/Admin/View');