Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5c301ee

Browse files
winglianWing Lian
authored andcommitted
allow route middlewares to be grouped together
1 parent 5a4b2b3 commit 5c301ee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Illuminate/Routing/Router.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,9 +703,9 @@ protected function gatherRouteMiddlewares(Route $route)
703703
{
704704
return Collection::make($route->middleware())->map(function($m)
705705
{
706-
return array_get($this->middleware, $m, $m);
706+
return Collection::make(array_get($this->middleware, $m, $m));
707707

708-
})->all();
708+
})->collapse()->all();
709709
}
710710

711711
/**

0 commit comments

Comments
 (0)