承接 alexdover/blade-set 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

alexdover/blade-set

Composer 安装命令:

composer require alexdover/blade-set

包简介

A very simple blade extension which allows variables to be set.

README 文档

README

A very simple blade extension which allows variables to be set.

Current version is for Laravel 4.2.

If you wish to use with Laravel 4.1, please use v1.0.2

Example

@set('my_variable', $existing_variable)

You can then use the variable $my_variable in the template.

You might choose to fetch a bunch of models from your template, for example

@set('my_model_list', MyModel::where('something', '=', 1)->paginate(10))

Why?

Compare

<?php $my_model_list = MyModel::where('something', '=', 1)->paginate(10); ?>

to

@set('my_model_list', MyModel::where('something', '=', 1)->paginate(10))

I felt that the use of the @set was a more elegant solution in the context of blade templates.

Installation

Require this package in your composer.json and update composer. This will download the package.

"alexdover/blade-set": "1.*"

After updating composer, add the ServiceProvider to the providers array in app/config/app.php

'Alexdover\BladeSet\BladeSetServiceProvider',

All done!

Licence

You can use this package under the MIT license

Feedback

If you have any questions, feature requests or constructive ctritcism then please get in touch.

Twitter - @alexdover

统计信息

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

GitHub 信息

  • Stars: 23
  • Watchers: 1
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-06-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固