PHP code example of cyneek / yii2-blade

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

    

cyneek / yii2-blade example snippets



...
'components' => [
        'view' => [
            'class' => 'yii\web\View',
            'renderers' => [
                'blade' => [
                    'class' => '\cyneek\yii2\blade\ViewRenderer',
                    'cachePath' => '@runtime/blade_cache',
                ],
            ],
        ],
]
...

    public function behaviors()
    {
        return [
            ...
            'blade' => [
                'class' => BladeBehavior::className()
            ],
            ...
        ];
    }