Skip to content

Commit

Permalink
истории, которых нет в обучении
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr Karachev committed Nov 8, 2024
1 parent 6216de8 commit 80cbd12
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions modules/edu/controllers/admin/StoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,20 @@ public function actionIndex(): string
])
->from(['s' => 'story'])
->where('s.published_at IS NOT NULL')
->andWhere(['between', 's.published_at', $betweenBegin, $betweenEnd])
->orderBy(['s.published_at' => SORT_DESC]);
->andWhere(['between', 's.published_at', $betweenBegin, $betweenEnd]);

$dataProvider = new SqlDataProvider([
'sql' => $query->createCommand()->getRawSql(),
'totalCount' => $query->count(),
'sort' => [
'attributes' => [
'id', 'title', 'publishedAt',
],
'defaultOrder' => ['publishedAt' => SORT_DESC],
],
'pagination' => [
'pageSize' => 100,
],
]);
return $this->render('index', [
'dataProvider' => $dataProvider,
Expand Down

0 comments on commit 80cbd12

Please sign in to comment.