thinkphp5.1 - twig使用
1、安装按照:
https://github.com/yunwuxin/think-twig
Twig Template For ThinkPHP5

安装

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

composer require yunwuxin/think-twig
使用

配置文件里 template.type=Twig 即可

2、
使用:
public function index()
{
return $this->fetch("index");
}

参考:
其他人写的扩展:https://github.com/wdaglb/thinkphp-twig

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄