I am trying to get the base URL for the project in Yii 2 but it doesn\'t seem to work. According to this page you used to be able to do:
Yii::app()->getBa
Try below code. It should work. It will return base URL name
use yii\helpers\Url;
Url::home('http') // http://HostName/ OR Url::home('https') // https://HostName/