schranz-templating/spiral-mustache-integration

通过mustache模板引擎将模板渲染器集成到spiral中。

0.1.0 2022-11-14 21:24 UTC

This package is auto-updated.

Last update: 2024-08-29 06:13:04 UTC


README

Mustache Adapter集成到Spiral框架中。

Schranz Templating Project的一部分。

安装

通过Composer安装此包

composer require schranz-templating/spiral-mustache-integration

如果框架未自动添加,请在您的app/src/Application/Kernel.php中注册Bootloader类

class Kernel extends \Spiral\Framework\Kernel
{
    protected const LOAD = [
        // ...
        \Schranz\Templating\Integration\Spiral\Mustache\Bootloader\MustacheBootloader::class,
    ];
}

配置

此集成提供了以下配置。

// app/config/schranz_templating_mustache.php

declare(strict_types=1);

return [
    'path' => 'app/views',
    'cache_dir' => 'runtime/cache/cache',
];