Skip to content

Commit

Permalink
Replace Str::chopStart for Laravel 10 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
marcorieser committed Jan 19, 2025
1 parent 41e2a00 commit 8923ba4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Assets/AssetContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ public function url()
}

$url = rtrim($this->disk()->url('/'), '/');
$url = Str::chopStart($url, config('app.url'));

if (str_starts_with($url, config('app.url'))) {
$url = substr($url, strlen(config('app.url')));
}

return ($url === '') ? '/' : $url;
}
Expand Down

0 comments on commit 8923ba4

Please sign in to comment.