Exemplo n.º 1
0
 /**
  * Displays a single Card model.
  *
  * @param string $id
  *
  * @return mixed
  */
 public function actionView($id)
 {
     $searchModel = new SalesSearch();
     //        $param  = Yii::$app->request->getQueryParams();
     $param['SalesSearch']['card'] = $id;
     $dataProvider = $searchModel->search($param);
     return $this->render('view', ['model' => $this->findModel($id), 'sales' => Sales::find(['card' => $id]), 'dataProvider' => $dataProvider, 'searchModel' => $searchModel]);
 }
Exemplo n.º 2
0
 /**
  * Lists all Sales models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new SalesSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());
     return $this->render('index', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel]);
 }