Commit a0454966 by Taylor Otwell

pass request into route closures.

parent e0a9f575
......@@ -37,7 +37,7 @@ return array(
|
*/
'GET /' => function()
'GET /' => function($request)
{
return View::make('home.index');
},
......
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment