evoluted / twigtools-plugin
PyroCMS 3.x上Twig的有用开发调试工具
1.0.0
2018-07-20 12:33 UTC
This package is auto-updated.
Last update: 2024-09-25 13:45:21 UTC
README
Twigtools是一个PyroCMS插件,提供用于开发和调试twig的有用工具。
最初,此插件在twig模板内部提供以下功能
dd
输出项目并终止页面其余部分的执行。debug
输出项目并继续执行debug
将项目调试到 Debugbar 的消息选项卡下
安装
您可以通过在您的composer文件中require此插件来将其安装到现有的PyroCMS 3.x安装中
"require-dev": {
"evoluted/twigtools-plugin": "~1.0",`
}
或者通过运行命令行composer install命令
composer require evoluted/twigtools-plugin
一旦安装,您无需执行任何其他操作即可开始使用此插件。
用法
dd
dd(yourVariable)
使用 Laravels dump方法,并停止执行。
dump
dump(yourVariable)
使用 Laravels dump方法,但继续渲染页面的其余部分。
debug
debug(yourVariable)
将变量调试到 Laravel Debugbar(如果已安装)
未来想法
- 对象和数组的操作(例如排序、在数组中插入等)
- 从twig内部将调试信息输出到日志文件
发布历史
- 1.0.0
- 初始版本,包含
dd()
、debug()
、debug()
- 初始版本,包含
贡献
- 将其Fork(https://github.com/EvolutedNewMedia/twigtools-plugin/fork)
- 创建您的功能分支(
git checkout -b feature/fooBar
) - 提交您的更改(
git commit -am 'Add some fooBar'
) - 将更改推送到分支(
git push origin feature/fooBar
) - 创建新的Pull Request