The url function generates a fully qualified URL to the given path:
<?php $url = url('user/profile');

$url = url('user/profile', [1]);