飘逸
你可以为其配置 content 属性,属性的值是一个匿名函数。他看起来就像是这样子的
'columns' => [ 'id', 'title', [ 'attribute' => 'created_at', 'content' => function ($model, $key, $index, $column) { return '你需要的字符串,在这里的$model很有用比如:' . $model->created_at; } ], ],
@474352380 哦哦,为毛教育你的啊?
- 飘逸 2016-07-22 已签到连续签到1天,获得了5个金钱
- 飘逸 2016-07-20 已签到连续签到2天,获得了10个金钱
- 飘逸 回答了问题 GridView::widget() 的一些小疑问。
你可以为其配置 content 属性,属性的值是一个匿名函数。他看起来就像是这样子的
'columns' => [ 'id', 'title', [ 'attribute' => 'created_at', 'content' => function ($model, $key, $index, $column) { return '你需要的字符串,在这里的$model很有用比如:' . $model->created_at; } ], ],
- 飘逸 2016-07-19 已签到连续签到1天,获得了5个金钱
- 飘逸 2016-07-15 已签到连续签到1天,获得了5个金钱
- 飘逸 2016-06-22 已签到连续签到3天,获得了15个金钱
- 飘逸 2016-06-21 已签到连续签到2天,获得了10个金钱