Skip to content

Commit

Permalink
Don't prepend group namespace if it's part of controller (#41021)
Browse files Browse the repository at this point in the history
  • Loading branch information
moisish authored Feb 15, 2022
1 parent b74e66b commit 2ff6066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Routing/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ protected function prependGroupNamespace($class)
{
$group = end($this->groupStack);

return isset($group['namespace']) && ! str_starts_with($class, '\\')
return isset($group['namespace']) && ! str_starts_with($class, '\\') && ! str_starts_with($class, $group['namespace'])
? $group['namespace'].'\\'.$class : $class;
}

Expand Down

0 comments on commit 2ff6066

Please sign in to comment.