generator = new LaravelGenerator(); } public function createRoute(string $httpMethod, string $path, string $controllerMethod, $register = false) { if ($register) { return RouteFacade::{$httpMethod}($path, TestController::class . "@$controllerMethod"); } else { return new Route([$httpMethod], $path, ['uses' => TestController::class . "@$controllerMethod"]); } } }