'urlManager' => [
'enablePrettyUrl' => true,
// 'enableStrictParsing' => true,
'showScriptName' => false,
// here is your backend URL rules
'rules' => [
[
'class' => 'yii\rest\UrlRule',
'controller' => ['v1/country', 'v1/menu'],
'tokens' => [
'{id}' => '<id:\\w+>',
],
],
[
'class' => 'yii\rest\UrlRule',
'controller' => ['v1/user'],
'extraPatterns' => [
'GET login' => 'login',
],
]
],
],