Skip to content

Commit

Permalink
Fix URL::useOrigin/forceRootURL
Browse files Browse the repository at this point in the history
  • Loading branch information
shalvah committed Feb 25, 2025
1 parent f96342b commit 956e9bf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Commands/GenerateDocumentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,10 @@ public function bootstrap(): void
$baseUrl = $this->docConfig->get('base_url') ?? config('app.url');

/* @phpstan-ignore-next-line */
if (version_compare(Application::VERSION, '11.0', '>=')) {
// Renamed in Laravel 11
try {
// Renamed from forceRootUrl in Laravel 11.43 or so
URL::useOrigin($baseUrl);
} else {
/* @phpstan-ignore-next-line */
} catch (\BadMethodCallException) {
URL::forceRootUrl($baseUrl);
}

Expand Down

0 comments on commit 956e9bf

Please sign in to comment.