diff --git a/application/routes.php b/application/routes.php index 94efd50d..2f1372c8 100644 --- a/application/routes.php +++ b/application/routes.php @@ -37,7 +37,7 @@ return array( | */ - 'GET /' => function() + 'GET /' => function($request) { return View::make('home.index'); }, diff --git a/laravel/routing/handler.php b/laravel/routing/handler.php index d391840d..91e1197d 100644 --- a/laravel/routing/handler.php +++ b/laravel/routing/handler.php @@ -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))