Update output-data-widgets.md

changed  $query->from(['author' => 'users'])  to  $query->from(['author' , 'users']) on line 354
This commit is contained in:
amjadniazi48
2014-10-13 22:11:20 +05:00
parent da3f8861ee
commit 22fff48bb2

View File

@ -351,7 +351,7 @@ $dataProvider = new ActiveDataProvider([
// join with relation `author` that is a relation to the table `users` // join with relation `author` that is a relation to the table `users`
// and set the table alias to be `author` // and set the table alias to be `author`
$query->joinWith(['author' => function($query) { $query->from(['author' => 'users']); }]); $query->joinWith(['author' => function($query) { $query->from(['author' , 'users']); }]);
// enable sorting for the related column // enable sorting for the related column
$dataProvider->sort->attributes['author.name'] = [ $dataProvider->sort->attributes['author.name'] = [
'asc' => ['author.name' => SORT_ASC], 'asc' => ['author.name' => SORT_ASC],