示例#1
0
 /**
  * Lists all Order models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new OrderSearch();
     $searchModel->provider_id = $this->getProvider()->id;
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
示例#2
0
 /**
  * Lists all Order models.
  * @return mixed
  */
 public function actionIndex($status_fk = 0, $customer_fk = 0)
 {
     $searchModel = new OrderSearch();
     if ($status_fk) {
         $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $status_fk);
     } elseif ($customer_fk) {
         $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $customer_fk);
     } else {
         $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     }
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }