定制 kindari/blade-alternator 二次开发

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

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

kindari/blade-alternator

Composer 安装命令:

composer require kindari/blade-alternator

包简介

README 文档

README

Blade Alternator is a small extension to blade that adds the common operation of changing values throughout a loop. Now thats a horrible description, so heres an example:

@foreach($users as $user)
	<tr class="@alternate('odd', 'even')">...</tr>
@endforeach

Which would result in alternating rows of a table, with the class switching between odd and even every time. This works with any number of arguments, for example, you might see a image gallery with three columns.

@foreach($images as $image)
	<img src="{{ $img->url }}" class="@alternate('left', 'mid', 'right')" />
@endforeach

Installation

Add kindari/blade-alternator to composer.json.

"kindari/blade-alternator": "1.0.*"

Run composer update to pull down the latest version of Blade Alternator. Now open up app/config/app.php and add the service provider to your providers array, after the ViewServiceProvider.

'providers' => array(
	...
		'Illuminate\View\ViewServiceProvider',
		'Kindari\BladeAlternator\BladeAlternatorServiceProvider',
	...
)

统计信息

  • 总下载量: 26
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2013-09-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固