Blame view

frontend/controllers/CallController.php 727 Bytes
ecf49b1b   Administrator   second
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  <?php
  
  namespace frontend\controllers;
  
  use Yii;
  use yii\web\Controller;
  use common\models\Call;
  use yii\web\HttpException;
  
  class CallController extends Controller
  {
  
      public function actionIndex()
      {
              
              $model = new Call;
              
              if ($model->load(Yii::$app->request->post()) && $model->contact('borisenko.pavel@gmail.com')) {
                       
                  return Yii::$app->response->redirect(['call/success']);      
              }            
              
              return $this->render('index', [
                      'model'=>$model,
              ]);
      }
      
      
      public function actionSuccess(){
              return $this->render('success');        
      }
      
  }