Answer the question
In order to leave comments, you need to log in
How to generate beautiful addresses when using forms?
here is the form
<?php $form=ActiveForm::begin(['action'=>Yii::$app->urlManager->createUrl(['/serial/category/search']),'method'=>'get']); ?>
<?= Html::textInput('query','',['placeholder'=>'Поиск']) ?>
<div class="form-group">
<?= Html::submitButton('<i class="fa fa-search"></i>') ?>
</div>
<?php $form=ActiveForm::end(); ?>
'/serial/category/search/<query>' => '/serial/category/search',
'/serial/category/search/<query:\w*>' => '/serial/category/search',
'<module:serial>/<controller:category>/<action:searh>/<query>' => '<module>/<controller>/<action>',
'<module:serial>/<controller:category>/<action:searh>/<query:\w*>' => '<module>/<controller>/<action>',
'<module:\w+>/<controller:\w+>/<action:(\w|-)+>/<query>' => '<module>/<controller>/<action>',
'<module:\w+>/<controller:\w+>/<action:(\w|-)+>/<query:\w*>' => '<module>/<controller>/<action>',
'<module:\w+>/<controller:\w+>/<action:(\w|-)+>' => '<module>/<controller>/<action>',
http://site.com/serial/category/search?query=Запрос
http://site.com/serial/category/search/Запрос
, where am I stupid, do not tell me?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question