How we can change the url for yii::app()->homeurl in yii2?
Answer Posted / Satendra Kumar Batsal
To change the URL of yii::app()->homeUrl in Yii2, you need to set the value of 'homeUrl' in your application's configuration. Here is an example of how to do it in a web-based config file:
```php
return [
// other settings...
'components' => [
'urlManager' => [
'class' => yiiwebUrlManager::class,
'homeUrl' => '/your-desired-url',
],
],
];
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers