Commit ce838860 by Jeff

Add comment to documentation sample code

Add comment to documentation sample code for GridView
parent ecd9181a
...@@ -89,7 +89,7 @@ echo GridView::widget([ ...@@ -89,7 +89,7 @@ echo GridView::widget([
[ [
'class' => 'yii\grid\DataColumn', // can be omitted, default 'class' => 'yii\grid\DataColumn', // can be omitted, default
'value' => function ($data) { 'value' => function ($data) {
return $data->name; return $data->name; //$data['name'] for array data, e.g. using SqlDataProvider.
}, },
], ],
], ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment