/** * Lists all Users models. * @return mixed */ public function actionIndex() { $searchModel = new OrdersSearch(); //Yii::$app->request->queryParams 获取get请求的参数 个人认为 等同于 Yii::$app->request->get() $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }
public function actionIndex($date = false) { $tomorrow = strtotime("+1 day"); $date === false ? $date = date('Y-m-d', $tomorrow) : $date; $searchModel = new OrdersSearch(); $dataProvider = $searchModel->search(Yii::$app->request->get(), $date); return $this->render('orders', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel, 'date' => $date]); }
public function actionList() { $searchModel = new OrdersSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('list', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }
/** * Lists all Orders models. * @return mixed */ public function actionIndex() { $searchModel = new OrdersSearch(); $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams()); return $this->render('index', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel]); }