How we can change the url for yii::app()->homeurl in yii2?
Answer / 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 |
How to use datetimepicker in yii2?
How we can remove index.php from url in yii?
What is gii? Why it is used?
What is the first function that gets loaded from a controller?
How we can get current controller & action name in yii?
What is the first file that gets loaded when you run a application using yii?
What is helper in yii?
How you can write a custom component and use it inside your app?
How to make layout in yii?
How to connect to the database?
What are the naming convention in yii 2.0 framework?
How to use session in yii?