Beispiel #1
0
 public function actionIndex()
 {
     $query = Time::find();
     //var_dump($query);die;
     $pagination = new Pagination(['defaultPageSize' => 5, 'totalCount' => $query->count()]);
     $row = $query->orderBy('_id desc')->offset($pagination->offset)->limit($pagination->limit)->all();
     return $this->renderPartial('index', ['data' => $row, 'pagination' => $pagination]);
 }
Beispiel #2
0
 /**
  * Lists all Time models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => Time::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }