private function extractController($path, $controller, $initialSpace = '')
    {
        $class = new ReflectionClass($this->controllersNamespace.'\\'.$controller);

        $methods = $class->getMethods(ReflectionMethod::IS_PUBLIC);

        $routables = array_filter($methods, function ($method) {
            return
                $method->class != 'Illuminate\Routing\Controller' &&
                Str::startsWith($method->name, ['any', 'get', 'post', 'put', 'delete', 'patch']);
        });

        $routes = "\n$initialSpace// $controller\n";

        foreach ($routables as $routable) {
            $routes .= $initialSpace.$this->createRoute($routable, $path, $controller);
        }

        return $routes;
    }