yii2-multilingual-behavior
yii2-multilingual-behavior copied to clipboard
Don't work with Data Provider with ListView and findAll().
$news = new ActiveDataProvider([
'query' => Post::find()->multilingual(),
'sort' => [
'defaultOrder' => [
'id' => SORT_DESC
]
]
]);
<?= ListView::widget([
'summary' => false,
'dataProvider' => $jobs,
'itemView' => '_list'
]) ?>
$query = Bank::find()->multilingual()->joinWith(['translation']); $dataProvider = new ActiveDataProvider([ 'query' => $query, ]);