public function actionIndex() { $model = new Delivery('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Delivery'])) { $model->attributes = $_GET['Delivery']; } $this->render('index', ['model' => $model]); }