Merge pull request #359 from akuzemchak/feature/load-route
Load designated route's response
This commit is contained in:
commit
6e82a4ac8d
|
@ -380,5 +380,17 @@ public static function filter($name, $callback)
|
||||||
{
|
{
|
||||||
Filter::register($name, $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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue