Пример #1
0
 public function actionIndex()
 {
     $doctors = Doctor::model()->findAll();
     $patient = new Patient('search');
     $patient->unsetAttributes();
     // clear any default values
     if (isset($_GET['Patient'])) {
         $patient->attributes = $_GET['Patient'];
     }
     $this->render('index', compact('doctors', 'patient'));
 }
 /**
  * Manages all models.
  */
 public function actionIndex()
 {
     LoginForm::checkLogin();
     $this->pageTitle = "Patients";
     $model = new Patient('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Patient'])) {
         $model->attributes = $_GET['Patient'];
     }
     $this->render('index', array('model' => $model));
 }