From 115eb8d085515388f7de932feb52eea861ad65f0 Mon Sep 17 00:00:00 2001 From: Aaron Kuzemchak Date: Thu, 23 Feb 2012 20:08:12 -0500 Subject: [PATCH] Added shortcut method to load a designated route's response --- laravel/routing/route.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/laravel/routing/route.php b/laravel/routing/route.php index 97a8f524..6243d1e4 100644 --- a/laravel/routing/route.php +++ b/laravel/routing/route.php @@ -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(); + } } \ No newline at end of file