brainlight/brainlight-for-laravel
最新稳定版本:v1.1.0
Composer 安装命令:
composer require brainlight/brainlight-for-laravel
包简介
Laravel support for Brainlight template engine.
README 文档
README
Brainlight is a lightweight templating system with minimal logic pattern.
This is Laravel support for the Brainlight Php template engine.
Requirements
- PHP >= 8.1
- Laravel ^8.0|^9.0|^10.0
Installation
Require Brainlight for Laravel package in your Laravel project using the following command:
composer require brainlight/brainlight-for-laravel
By default, Brainlight for Laravel stores its cache in storage_path('brain'). If you don't plan to change this path, create a new brain directory in your storage folder.
Probably, you also want to create a .gitignore file in this new directory:
*
!.gitignore
Configuration
Publish the configuration file with the command:
php artisan vendor:publish --provider="BrainlightPhp\BrainlightForLaravel\BrainlightServiceProvider"
Then edit the configuration file that you've just created under: config/brainlight.php
Make reference to the Brainlight PHP documentation for options customization.
Usage
You can render Brainlight template files the same way as a Blade one:
return view('template', ['content' => 'Hello world.']);
template.brain:
<p>{{content}}</p>
Make reference to the Brainlight documentation for templates syntax.
License
Brainlight for Laravel is open-sourced software licensed under the MIT license
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-07