Added shortcut method to load a designated route's response

This commit is contained in:
Aaron Kuzemchak 2012-02-23 20:08:12 -05:00
parent 2b4ab94e6b
commit 115eb8d085
1 changed files with 12 additions and 0 deletions

View File

@ -348,5 +348,17 @@ public static function filter($name, Closure $callback)
{
Filter::register($name, $callback);
}
/**
* Calls the specified route and returns its response.
*
* @param string $method
* @param string $uri
* @return Response
*/
public static function load($method, $uri)
{
return Router::route(strtoupper($method), $uri)->call();
}
}