Params as path by default

When you create a URL like this:

['controller/update', 'id' => $model->id]

It returns an URL like this: controller/update?id=1

So is there any way to return it as a path? Like this controller/update/id/1? On Yii 1.1 I used to do it manually, by adding the params to the URL to make it work.

As explained in the docs:




Try enabling Pretty URLs to get URLs as you need.


    'components' => [

        'urlManager' => [

            'enablePrettyUrl' => true,

            'showScriptName' => false,

            'enableStrictParsing' => true,

            'rules' => [

                // ...





Pretty url is set to true. URL are working fine but params don’t.