Skip to content

Commit

Permalink
Merge pull request #125 from Laravel-Backpack/revert-basset-cache-bus…
Browse files Browse the repository at this point in the history
…ting-string

add back the cache string for ALL assets
  • Loading branch information
pxpm authored Apr 17, 2024
2 parents b927ec0 + 3b0e268 commit 83d5c25
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Helpers/FileOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,7 @@ public function write(string $path, array $attributes = []): void
*/
public function assetPath(string $path): string
{
// if path is not a url or it's local url, we will append the cachebusting
if (! Str::startsWith($path, ['http://', 'https://', '://']) || Str::startsWith($path, url(''))) {
$path .= $this->cachebusting;
}

$asset = Str::of(asset($path));
$asset = Str::of(asset($path.$this->cachebusting));

if ($this->useRelativePaths && $asset->startsWith(url(''))) {
$asset = $asset->after('//')->after('/')->start('/');
Expand Down

0 comments on commit 83d5c25

Please sign in to comment.