Code Tidy - Pastebin

New     Fork     Embed     View raw     Report

Controller - php

Embed

You can embed this paste into a blog or website with this code:

<iframe class="codetidy" type="text/html" width="100%" src="http://codetidy.com/paste/embed/6947" frameborder="0"></iframe>

Add comment

Captcha
  1. <?php?
  2. namespace app\controllers;?
  3.  ?
  4. use yii\data\ArrayDataProvider;?
  5. use yii\db\Query;?
  6. use yii\web\Controller;?
  7. use yii\data\Pagination;?
  8. use app\models\Manager;?
  9. use yii\helpers\Html;?
  10.  ?
  11. class ManagerController extends Controller?
  12. {?
  13.     public function actionIndex()?
  14.     {?
  15.         $queryManager = (new Query())?
  16.             ->select(['fio_2_u', 'fio_1_u', 'ms_id_u'])?
  17.             ->from('d_users')?
  18.             ->orderBy('fio_2_u')?
  19.             ->all();?
  20.  ?
  21.         return $this->render('index', [?
  22.             'managers' => $queryManager,?
  23.         ]);?
  24.     }?
  25.  ?
  26.     public function actionSelectManager()?
  27.     {?
  28.         if ($model->load(Yii::$app->request->post()) && $model->validate()) {?
  29.             return $this->render('client');?
  30.         }?
  31.     }?
  32. }?
© 2011 Code Tidy