Example #1
0
 public function actionReg()
 {
     $model = new Reg();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
     }
     return $this->render('reg', ['model' => $model]);
 }
Example #2
0
 public function update(Request $request, $id)
 {
     $data = Reg::find($id);
     $data->name = $request->input('name');
     $data->email = $request->input('email');
     $data->save();
 }
 public function update(Request $request, $id)
 {
     $data = Reg::find($id);
     $data->name = $request->input('name');
     $data->email = $request->input('email');
     $data->save();
     return redirect('show_user');
 }
Example #4
0
 /**
  * Finds the Reg model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Reg the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Reg::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }