public function actionContact() { $data = $this->getCommonDate(); $iP = Yii::$app->session->id; $quantityInCart = Cart::getQountAllByIp($iP); $modelReqvizit = Reqvizit::findOne(1); return $this->render('contact', ['data' => $data, 'quantityInCart' => $quantityInCart, 'modelReqvizit' => $modelReqvizit]); }
/** * Finds the Reqvizit model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return Reqvizit the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = Reqvizit::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }