Permalink
Browse files

Controller method is now passed to missingMethod as first parameter.

  • Loading branch information...
taylorotwell committed Nov 3, 2013
1 parent 9c0b308 commit de871fe7db2798071e8ca877d04ba7e6629f9f18
Showing with 6 additions and 4 deletions.
  1. +2 −1 src/Illuminate/Foundation/changes.json
  2. +4 −3 src/Illuminate/Routing/Controller.php
@@ -46,7 +46,8 @@
{"message": "New Cache::tags feature that allows tagging cached items and flushing them by any tag.", "backport": null},
{"message": "New FrameGuard middleware sends SAMEORIGIN X-Frame-Options header on each response by default.", "backport": null},
{"message": "Added 'joinWhere' and 'leftJoinWhere' to query builder for joins with bindings.", "backport": null},
{"message": "Added 'require_without_all' validation rule.", "backport": null}
{"message": "Added 'require_without_all' validation rule.", "backport": null},
{"message": "Controller method is now passed to missingMethod as first parameter.", "backport": null}
],
"4.0.x": [
{"message": "Added implode method to query builder and Collection class.", "backport": null},
@@ -199,12 +199,13 @@ public function getLayout()
/**
* Handle calls to missing methods on the controller.
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public function missingMethod($parameters)
public function missingMethod($method, $parameters)
{
throw new NotFoundHttpException("Controller method not found.");
throw new NotFoundHttpException("Controller method [{$method}] not found.");
}
/**
@@ -216,7 +217,7 @@ public function missingMethod($parameters)
*/
public function __call($method, $parameters)
{
return $this->missingMethod($parameters);
return $this->missingMethod($method, $parameters);
}
}

0 comments on commit de871fe

Please sign in to comment.