Skip to content

Commit

Permalink
fix: remove / after sub-directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Jan 26, 2022
1 parent 1bc33b8 commit b1ab1cd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private function getRouteWithoutController(

if ($classShortname === $defaultController) {
$pattern = '#' . preg_quote(lcfirst($defaultController), '#') . '\z#';
$routeWithoutController = preg_replace($pattern, '', $uriByClass);
$routeWithoutController = rtrim(preg_replace($pattern, '', $uriByClass), '/');
$routeWithoutController = $routeWithoutController ?: '/';

$output[] = [
Expand Down

0 comments on commit b1ab1cd

Please sign in to comment.