芬戈尼/芬戈尼-plate引擎

芬戈尼板引擎是一个简单的类,它充当Laravel板模板引擎和芬戈尼框架之间的桥梁。

0.0.1 2024-02-16 11:58 UTC

This package is auto-updated.

Last update: 2024-09-16 14:28:52 UTC


README

这是一个封装Plates模板引擎并使其在芬戈尼框架中易于使用的简单类。

在你的芬戈尼项目中运行

composer require fignon/fignon-plate-engine

然后,可以这样使用它

//app.php (or index.php) depending of how you call you entry point
declare(strict_types=1);

include_once __DIR__ . "/../vendor/autoload.php";

use Fignon\Tunnel;
use App\Features\Features;
use Fignon\Extra\PlatesEngine;

$app = new Tunnel();
$app->set('env', 'development');
// ... other middlewares

// View engine initialization
$app->set('views', dirname(__DIR__) . '/templates');
$app->set('views cache', dirname(__DIR__) . '/var/cache');
$app->set('view engine options', []); // Add options to the view engine
$app->engine('plates', new PlatesEngine()); 

$app->set('case sensitive routing', true);
//  ... other middlewares


// You can then use it to render
(new Features($app))->bootstrap();

$app->listen();

芬戈尼的其他视图引擎集成包括