$video = Video::find()->select('id, video,v_text')->orderBy('id DESC');
$pages = new \yii\data\Pagination(['totalCount' => $video->count(), 'pageSize' => 4 ]);
$posts = $video->offset($pages->offset)->limit($pages->limit)->all();
return $this->render('video', ['video'=>$video],compact('posts', 'pages'));
public function actionVideo()
{
$video = Video::find()->select('id, video,v_text')->orderBy('id DESC');
$pages = new \yii\data\Pagination(['totalCount' => $video->count(), 'pageSize' => 4 ]);
$posts = $query->offset($pagin->offset)->limit($pagin->limit)->all();
return $this->render('video', ['video'=>$video],compact('posts', 'pages'));
}