Ejemplo n.º 1
0
 /**
  * Creates a new Oauth2Client model.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new Oauth2Client();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         Yii::$app->getSession()->setFlash('success', 'Client has been created');
         return $this->redirect(['update', 'id' => $model->client]);
     }
     $model->generateSecret();
     return $this->render('create', ['model' => $model]);
 }