I'm a newbie of Yii and now I have a link:
localhost/qr/delete/33
I dont' know how to make it as
localhost/qr-code/delete/33
using urlManager in main.php.
I'm a newbie of Yii and now I have a link:
localhost/qr/delete/33
I dont' know how to make it as
localhost/qr-code/delete/33
using urlManager in main.php.
Should be able to add this to your array in your config:
'qr-code/<action:\w+>/<id:\d+>' => 'qr/<action>',
//other rules here
This will make it so that delete or update actions can work. Make sure you put this before other rules so that it has a higher priority. id
will be passed as a variable to your action in your qr controller
public function actionDelete($id) {
//your code here
}
If qr is controller , delete is action and 33 is id, then here is your solution .