From ca019f46b2e137caa20ecc40fb728a27319b7bed Mon Sep 17 00:00:00 2001 From: cleeimpro Date: Sat, 26 Oct 2024 16:28:34 +0200 Subject: [PATCH 1/2] add str replace for external_laravel with elements-theme --- src/Writing/Writer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Writing/Writer.php b/src/Writing/Writer.php index 69db61cc..a0f01240 100644 --- a/src/Writing/Writer.php +++ b/src/Writing/Writer.php @@ -178,6 +178,7 @@ protected function performFinalTasksForLaravelType(): void $contents = str_replace('href="../docs/collection.json"', 'href="{{ route("' . $this->paths->outputPath('postman', '.') . '") }}"', $contents); $contents = str_replace('href="../docs/openapi.yaml"', 'href="{{ route("' . $this->paths->outputPath('openapi', '.') . '") }}"', $contents); $contents = str_replace('url="../docs/openapi.yaml"', 'url="{{ route("' . $this->paths->outputPath('openapi', '.') . '") }}"', $contents); + $contents = str_replace('Url="../docs/openapi.yaml"', 'Url="{{ route("' . $this->paths->outputPath('openapi', '.') . '") }}"', $contents); file_put_contents("$this->laravelTypeOutputPath/index.blade.php", $contents); } From 3ad4f1e6d3c34250fefc42d9a4e07713d432931e Mon Sep 17 00:00:00 2001 From: cleeimpro <46934974+cleeimpro@users.noreply.github.com> Date: Thu, 31 Oct 2024 12:09:03 +0100 Subject: [PATCH 2/2] Update src/Writing/Writer.php Co-authored-by: Shalvah --- src/Writing/Writer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Writing/Writer.php b/src/Writing/Writer.php index a0f01240..87f750af 100644 --- a/src/Writing/Writer.php +++ b/src/Writing/Writer.php @@ -178,6 +178,7 @@ protected function performFinalTasksForLaravelType(): void $contents = str_replace('href="../docs/collection.json"', 'href="{{ route("' . $this->paths->outputPath('postman', '.') . '") }}"', $contents); $contents = str_replace('href="../docs/openapi.yaml"', 'href="{{ route("' . $this->paths->outputPath('openapi', '.') . '") }}"', $contents); $contents = str_replace('url="../docs/openapi.yaml"', 'url="{{ route("' . $this->paths->outputPath('openapi', '.') . '") }}"', $contents); + // With Elements theme, we'd have paths->outputPath('openapi', '.') . '") }}"', $contents); file_put_contents("$this->laravelTypeOutputPath/index.blade.php", $contents);