I have read the question on using SluggableBehavior in Yii2
and in my trial case I can generate url like article/1/First-Article using the rule in urlManager
'article/<id:\d+>/<slug>' => 'article/view',
and using
\yii\helpers\Url::to(['article/view', 'id'=>$model->id, 'slug'=>$model->slug])
to create url.
In my real case, I use ['article/view', 'hash'=> $model->hash, 'slug'=>$model->slug] to generate url. My rule is
'article/<hash:[\d-\w]+>/<slug>'=>'article/view'
My url is like article/1e482d69129d760e9494b2c6e86eba2b/First-Article.
I want to only show url like article/First-Article, i.e. not showing the hash code in the url. Is there a way to achieve this? Thanks a lot!