Skip to content

Instantly share code, notes, and snippets.

View jamband's full-sized avatar
👀
web browser

Tomoki Morita jamband

👀
web browser
View GitHub Profile
@jamband
jamband / admin.php
Last active September 28, 2015 10:38
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id' => 'hoge-grid',
'dataProvider' => $model->search(),
'filter' => $model,
'columns' => array(
'id',
array(
'name' => 'username',
'value' => '$data->user->username',
),
@jamband
jamband / Hoge.php
Last active September 28, 2015 10:38
<?php
class Hoge extends CActiveRecord
{
public $username; // 追加
...
/**
* @see CModel::rules()
*/
public function rules()