Exemplo n.º 1
0
 /**
  * Lists all DetailModel models.
  * @return mixed
  */
 public function actionIndex()
 {
     // $searchModel = new DetailSearch();
     // $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     $dataProvider = new ActiveDataProvider(['query' => DetailModel::getDetailShow(), 'sort' => ['defaultOrder' => ['tgl' => SORT_DESC], 'attributes' => ['tgl', 'jumlah']]]);
     $model = new DetailModel();
     return $this->render('index', ['dataProvider' => $dataProvider, 'model' => $model]);
 }