D
D
Dmitry2014-09-09 10:38:15
Yii
Dmitry, 2014-09-09 10:38:15

How to set default parameters for a route in Yii2?

Hello. Tell me how to set the default route parameters in the configuration?
In Yii 1 it was like this

'pattern1'=>array('route1', 'urlSuffix'=>'.xml', 'defaultParam'=>array())

How to do it in Yii2?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Makarov, 2014-09-09
@drwhite87

'pattern1' => [
    'route' => 'site/view',
    'suffix' => '.xml',
    'defaults' => ['page' => 'about'],
]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question