Skip to content

Commit

Permalink
Merge pull request #52 from jaulz/patch-1
Browse files Browse the repository at this point in the history
Ensure route parameters passed to breadcrumb closures always stay consistent
  • Loading branch information
shengslogar authored Jul 27, 2022
2 parents a5311bc + 7c45548 commit 2d21326
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ protected function getCurrentRoute(): array
}

// Get the current route parameters
$params = array_values($route->parameters());
$params = array_values(array_map(function ($parameterName) use ($route) {
return $route->parameter($parameterName);
}, $route->parameterNames()));

return [$name, $params];
}
Expand Down

0 comments on commit 2d21326

Please sign in to comment.