Commit c972fe19 by Taylor Otwell

Merge remote-tracking branch 'pedroborges/develop' into request_is

parents 8a4db9ff d446ccc8
...@@ -59,6 +59,24 @@ class Request { ...@@ -59,6 +59,24 @@ class Request {
} }
/** /**
* Check the request URI.
*
* @param mixed $uri
* @return bool
*/
public static function is($uri)
{
if (is_array($uri))
{
return (in_array(static::uri(), $uri)) ? true : false;
}
else
{
return (static::uri() == $uri) ? true : false;
}
}
/**
* Get the request method. * Get the request method.
* *
* @return string * @return string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment