Helper yii\helpers\Url provides a set of static methods for managing URLs. This helper may used in views/controllers code.
URL to a route:
echo Url::to(['post/index']);
URL to a route with parameters:
echo Url::to(['post/view', 'id' => 100]);
anchored URL:
echo Url::to(['post/view', 'id...