I have created a custom Url in Yii2 using
'urlManager' => [
'class' => 'yii\web\UrlManager',
// Disable index.php
'showScriptName' => false,
// Disable r= routes
'enablePrettyUrl' => true,
'rules' => array(
'<controller:\w+>/<id:\d+>' => '<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
'site/GetNewTicketsTechnician' => 'site/get-new-tickets-technician',
),
]
in web.php(I am using basic template).
But when I try to create a url using
yii\helpers\Url::to(['site/get-new-tickets-technician'])
It is generating url as site/GetNewTicketsTechnician and not as
site/get-new-tickets-technician .
Can anybody knows the correct method to generate a url in Yii2 ?