Answer the question
In order to leave comments, you need to log in
How to redirect a request to a controller in Yii using a non-standard url?
In the action of the form I use the following url: docs/index.php?r=search/index, how to redirect the user to the pages: http://docs/index.php?r=search/index&query=query text ?
When a request is sent, it goes to docs/index.php?query=wawa
Answer the question
In order to leave comments, you need to log in
/**
* Экшен осуществляющий редирект
*
* @return \yii\web\Response
*/
public function actionExampe()
{
return $this->redirect(['search/index', 'query' => 'wawa']);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question