Skip to content

Commit

Permalink
Merge pull request #12991 from themsaid/reverse-terminiable-middlewar…
Browse files Browse the repository at this point in the history
…e-pr

[5.2] Reverse a breaking addition in Route.php
  • Loading branch information
taylorotwell committed Apr 3, 2016
2 parents 024f1f7 + ab4bad7 commit c7ffc33
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/Illuminate/Routing/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,7 @@ protected function extractOptionalParameters()
public function middleware($middleware = null)
{
if (is_null($middleware)) {
$middlewares = (array) Arr::get($this->action, 'middleware', []);

if (is_string($this->action['uses'])) {
$middlewares = array_merge(
$middlewares, $this->controllerMiddleware()
);
}

return $middlewares;
return (array) Arr::get($this->action, 'middleware', []);
}

if (is_string($middleware)) {
Expand Down

0 comments on commit c7ffc33

Please sign in to comment.