schranz-templating / laravel-latte-integration
通过 Latte 模板引擎将模板渲染器集成到 Laravel。
0.1.0
2022-09-17 15:53 UTC
Requires
- php: ^7.0 || ^8.0
- illuminate/support: ^8.0 || ^9.0
- illuminate/view: ^8.0 || ^9.0
- schranz-templating/latte-adapter: ^0.1
README
将模板适配器 Latte Adapter 集成到 Laravel 框架中。
是 Schranz Templating 项目 的一部分。
安装
通过 Composer 安装此包
composer require schranz-templating/laravel-latte-integration
根据项目设置,可能需要在 config/app.php
中添加以下内容
'providers' => [ // ... Schranz\Templating\Integration\Laravel\Latte\SchranzTemplatingLatteProvider::class, ],
配置
示例和默认配置可以在 config/schranz_templating_latte.php 中找到。
扩展
要扩展 Latte 功能,可以创建一个新的服务,该服务从 Latte\Extension
扩展而来,该服务需要使用 latte.extension
标签进行标记,以便作为 Latte 扩展进行注册
$app->tag(\App\Latte\MyExtension::class, 'latte.extension');
有关 Latte 扩展的更多信息,请参阅 Latte 文档。