echo URI::current();
echo URI::segment(1);
echo URI::segment(10, 'Foo');
echo URI::full();
Sometimes you may need to determine if the current URI is a given string, or begins with a given string. Here's an example of how you can use the is() method to accomplish this:
if (URI::is('home'))
{
// The current URI is "home"!
}
if URI::is('docs/*'))
{
// The current URI begins with "docs/"!
}
echo Request::method();
echo Request::server('http_referer');
echo Request::ip();
if (Request::secure())
{
// This request is over HTTPS!
}
if (Request::ajax())
{
// This request is using AJAX!
}
if (Request::cli())
{
// This request came from the CLI!
}