Skip to content

Commit

Permalink
Controller method is now passed to missingMethod as first parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 3, 2013
1 parent 9c0b308 commit de871fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Illuminate/Foundation/changes.json
Expand Up @@ -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},
Expand Down
7 changes: 4 additions & 3 deletions src/Illuminate/Routing/Controller.php
Expand Up @@ -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.");
}

/**
Expand All @@ -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.