antonchaikin/f3-blade
最新稳定版本:v1.0.0
Composer 安装命令:
composer require antonchaikin/f3-blade
包简介
Fat-Free Framework plugin for Blade template rendering
README 文档
README
Fat-Free Framework plugin for Blade template rendering.
This plugin integrates Jenssegers Blade into the Fat-Free Framework (F3), allowing you to use $f3->blade() to render Blade views.
💡 Installation
Install via Composer:
composer require antonchaikin/f3-blade
🚀 Usage
In your index.php:
use F3Blade\BladePlugin; BladePlugin::setPaths(__DIR__ . '/resources/views', __DIR__ . '/resources/cache'); BladePlugin::addNamespace('app', __DIR__ . '/resources/custom'); BladePlugin::register(); $f3->blade('home', ['title' => 'Hello']);
This will render resources/views/home.blade.php.
✨ Features
- Adds
$f3->blade()helper to render views using Blade - Supports setting custom view and cache paths
- Supports adding view namespaces via
addNamespace()
🧠 IDE Autocomplete
To enable autocomplete in IDEs (e.g. VS Code), use:
/** @var \Base&\F3Blade\BladeAwareF3 $f3 */
And define this interface:
namespace F3Blade; /** * @method string blade(string $view, array $data = [], array $mergeData = []) */ interface BladeAwareF3 {}
📁 File Structure
resources/
├── views/
│ └── home.blade.php
└── cache/
📝 License
MIT License © 2025 Anton Chaikin
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-28