/** * Creates a new ProductStockHistory model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new ProductStockHistory(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'time' => $model->time, 'warehouse_id' => $model->warehouse_id, 'product_id' => $model->product_id]); } else { return $this->render('create', ['model' => $model]); } }