diff --git a/src/Illuminate/Routing/Router.php b/src/Illuminate/Routing/Router.php index 92061f1b86b4..45a784501cc7 100644 --- a/src/Illuminate/Routing/Router.php +++ b/src/Illuminate/Routing/Router.php @@ -530,7 +530,7 @@ protected function prependGroupNamespace($class) { $group = end($this->groupStack); - return isset($group['namespace']) && strpos($class, '\\') !== 0 && !Str::startsWith($class, $group['namespace']) + return isset($group['namespace']) && strpos($class, '\\') !== 0 && ! Str::startsWith($class, $group['namespace']) ? $group['namespace'].'\\'.$class : $class; }