50onred / laravel-blade
将简单而强大的 Laravel Blade 模板引擎作为一个独立的组件使用。
1.3
2014-05-28 14:33 UTC
Requires
- illuminate/view: 4.1.*
This package is not auto-updated.
Last update: 2024-09-10 06:38:12 UTC
README
安装
您可以通过在项目的 composer.json 中要求 "50onred/laravel-blade": "1.3" 包来使用 Composer 安装此软件包。
[ "require": { "50onred/laravel-blade": "1.3" } ]
用法
<?php /* |-------------------------------------------------------------------------- | Register The Auto Loader |-------------------------------------------------------------------------- | | Composer provides a convenient, automatically generated class loader | for our application. We just need to utilize it! We'll require it | into the script here so that we do not have to worry about the | loading of any our classes "manually". Feels great to relax. | */ require 'vendor/autoload.php'; use FiftyOnRed\Blade\Blade; $views = __DIR__ . '/views'; $cache = __DIR__ . '/cache'; $blade = new Blade($views, $cache); echo $blade->view()->make('hello');
您可以使用 Laravel 4 文档中描述的所有 blade 功能:https://laravel.net.cn/docs/templates#blade-templating