'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'enableStrictParsing' => true,
'rules' => [
'/' => 'site/index',
'/index' => 'site/index',
[
'pattern' => '',
'route' => '',
'suffix' => '',
],
[
'pattern' => '<controller>/<action>/<id:\d+>',
'route' => '<controller>/<action>',
'suffix' => '',
],
[
'pattern' => '<controller>/<action>',
'route' => '<controller>/<action>',
'suffix' => '',
],
[
'pattern' => '<module>/<controller>/<action>/<id:\d+>',
'route' => '<controller>/<action>',
'suffix' => '',
],
[
'pattern' => '<module>/<controller>/<action>',
'route' => '<controller>/<action>',
'suffix' => '',
],
],
],
Customer::updateAll(['status' => 1], 'status = 2');
[
'class' => 'yii\rest\UrlRule',
'controller' => 'user',
'extraPatterns' => [
'GET search' => 'search',
],
]
[
'class' => 'yii\rest\UrlRule',
'controller' => 'api\device',
'extraPatterns' => [
'POST create' => 'create',
],
]