2017 © Pedro Peláez
 

yii2-extension yii2-blade

The blade integration for the Yii framework

image

xyb/yii2-blade

The blade integration for the Yii framework

  • Thursday, July 28, 2016
  • by smartyPHP
  • Repository
  • 2 Watchers
  • 3 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

yii2-blade

yii2集成laravel的blade模板引擎, (*1)

并没继承Laravel中的模板继承、视图片断功能。, (*2)

安装

composer.json 添加一行, (*3)

"xyb/yii2-blade": "*"

执行composer update就ok了。, (*4)

使用

'view' => [
    'class' => 'yii\web\View',
    'renderers' => [
       'blade' => [
       'class' => 'xyb\blade\ViewRenderer',
       //'cachePath' => '@runtime/blade',
       ],
    ],
],

默认会把layout的.php换成.blade,也就是说layout => main,会加载layouts/main.blade而不是layouts/main.php,同时渲染模板时候这样调用 $this->render('tpl.blade'), (*5)

The Versions

28/07 2016

dev-master

9999999-dev

The blade integration for the Yii framework

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 blade renderer

26/07 2016

1.0

1.0.0.0

The blade integration for the Yii framework

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 blade renderer