print url in view yii2
snippet in php

print url in view yii2

user6814

$currentUrl = Yii::$app->request->url; //gives current URL