pass request into route closures.

This commit is contained in:
Taylor Otwell
2011-08-25 23:17:11 -05:00
parent e0a9f57515
commit a045496684
2 changed files with 3 additions and 1 deletions

View File

@@ -95,6 +95,8 @@ class Handler {
*/
protected function handle_closure(Route $route, Closure $closure)
{
array_unshift($route->parameters, $this->request);
$response = call_user_func_array($closure, $route->parameters);
if (is_array($response))