Helper curl
The curl helper class provides URL utility methods.
curl::base
Returns the base URL of the application:
$baseUrl = curl::base();
// 'http://myapp.dev.cresenity.com/'
curl::current
Returns the current URI path:
$current = curl::current();
// 'admin/user/edit'
With query string:
$current = curl::current(true);
// 'admin/user/edit?page=2'
curl::redirect
Redirects to the given URL:
curl::redirect('https://example.com');
curl::redirect(curl::base() . 'home');
curl::site
Returns the full site URL for a given path:
$url = curl::site('admin/dashboard');
curl::query
Returns the current query string:
$query = curl::query();
// 'page=2&sort=name'