Comparing
#1 with
#2
Content
[...]
// absolute url
return Yii::$app->getUrlManager ()->createAbsoluteUrl ( $params, true );
}
```
In code code where ever you need to url to a model , you just call **$model->url** or **$model->getUrl('view')**.
You may have to additionally update urlManager in config with rules for pretty url.[...]