public function actionIndex() { $model = new Managers('search'); $model->unsetAttributes(); $names = Managers::model()->loadStaffAllModel(); if (isset($_GET['Managers'])) { $model->attributes = $_GET['Managers']; } $this->render('index', ['model' => $model, 'names' => $names]); }