getDb(); $command = $connection->createCommand(" CREATE OR REPLACE VIEW view_search AS " . implode(' UNION ', Yii::$app->params['search_rules'])); $command->execute(); } }