url helpers yii2 code example Example: print url in view yii2 Click to copy$currentUrl = Yii::$app->request->url; //gives current URL