$url = URL::base();
$url = URL::to('user/profile');
$url = URL::to_secure('user/login');
$url = URL::current();
$url = URL::full();
$url = URL::to_route('profile');
Sometimes you may need to generate a URL to a named route, but also need to specify the values that should be used instead of the route's URI wildcards. It's easy to replace the wildcards with proper values:
$url = URL::to_route('profile', array($username));
Further Reading:
$url = URL::to_action('user@profile');
$url = URL::to_action('user@profile', array($username));
URLs generated for assets will not contain the "application.index" configuration option.
$url = URL::to_asset('js/jquery.js');
There are several global functions for generating URLs designed to make your life easier and your code cleaner:
$url = url('user/profile');
$url = asset('js/jquery.js');
$url = route('profile');
$url = route('profile', array($username));
$url = action('user@profile');
$url = action('user@profile', array($username));