protected function addGroupNamespace($controller)
    {
        if (! empty($this->groupStack)) {
            $group = end($this->groupStack);

            if (isset($group['namespace']) && strpos($controller, '\\') !== 0) {
                return $group['namespace'].'\\'.$controller;
            }
        }

        return $controller;
    }