schranz-templating / spiral-latte-integration
将模板渲染器通过 Latte 模板引擎集成到 Spiral 中。
0.1.0
2022-11-14 21:24 UTC
Requires
- php: ^7.2 || ^8.0
- schranz-templating/latte-adapter: ^0.1
- spiral/boot: ^3.0
- spiral/config: ^3.0
- spiral/core: ^3.0
README
将模板适配器Latte Adapter集成到 Spiral 框架中。
是Schranz 模板项目的一部分。
安装
使用 Composer 安装此包
composer require schranz-templating/spiral-latte-integration
在您的 app/src/Application/Kernel.php
中注册 Bootloader 类,如果框架尚未自动添加
class Kernel extends \Spiral\Framework\Kernel { protected const LOAD = [ // ... \Schranz\Templating\Integration\Spiral\Latte\Bootloader\LatteBootloader::class, ]; }
配置
该集成提供以下配置。
// app/config/schranz_templating_latte.php declare(strict_types=1); return [ 'path' => 'app/views', 'cache_dir' => 'runtime/cache/latte', ];