dark/smarty-view 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

dark/smarty-view

Composer 安装命令:

composer require dark/smarty-view

包简介

Smarty view engine incl. View Composer support for Laravel 4

README 文档

README

Implementation of Smarty for Laravel 4.x.

Unlike Twig and other template engines for Laravel (other than raw PHP and Blade), this supports View Composers.

Undefined variables (and other E_NOTICE errors) are also silently allowed, as a matter of personal preference and because it's generally the Smarty way of doing things.

Smarty itself has been included because file edits were required for View Composer support. It should not be upgraded without these being merged, unless you don't care about View Composers.

Installation

You can install this through composer with:

"dark/smarty-view": "dev-master"

in composer.json -> "require".

If you're using Laravel 4.0, swap "dev-master" for "dev-laravel-4.0"

If you're using Laravel 4.1, swap "dev-master" for "dev-laravel-4.1"

If you're sticking with Laravel 4.2, swap "dev-master" for "dev-laravel-4.2"

Usage

To use, add to config/app.php -> providers:

'Dark\SmartyView\SmartyViewServiceProvider',

Then simply reference templates using the normal dot syntax of Laravel.

For example to load smarty template views/blog/post.tpl, you would use View::make('blog.post').

In Smarty {include} or {extends} tags, you should continue to use the full directory syntax, e.g. {extends file="blog/post.tpl"}.

统计信息

  • 总下载量: 4.03k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 23
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 22
  • Watchers: 5
  • Forks: 13
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-01-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固