定制 antonchaikin/f3-blade 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-28