Skip to content

Commit

Permalink
use sortBy
Browse files Browse the repository at this point in the history
  • Loading branch information
themsaid committed Sep 19, 2017
1 parent d61ca1c commit b1e01e7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Illuminate/Routing/RouteCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,7 @@ public function match(Request $request)
*/
protected function matchAgainstRoutes(array $routes, $request, $includingMethod = true)
{
return collect($routes)->sort(function ($route) {
return $route->isFallback;
})->first(function ($value) use ($request, $includingMethod) {
return collect($routes)->sortBy('isFallback')->first(function ($value) use ($request, $includingMethod) {
return $value->matches($request, $includingMethod);
});
}
Expand Down

0 comments on commit b1e01e7

Please sign in to comment.