Ejemplo n.º 1
0
 public function actionInterview()
 {
     $model = new Interview();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         Yii::$app->session->setFlash('success', 'Thanks for time, you\'ll be notified at near time');
         return $this->redirect(Url::home());
     }
     $this->detachBehaviors('accessOnce');
     return $this->render('interview', ['model' => $model]);
 }
Ejemplo n.º 2
0
 /**
  * Finds the Interview model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Interview the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Interview::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }