how to get current page url in yii2 code example Example: yii current url // Yii 1 Yii::app()->request->url // Yii 2 Yii::$app->request->url