Skip to content

Commit

Permalink
Changed URL generation for media paths
Browse files Browse the repository at this point in the history
From url() to asset()
  • Loading branch information
Hyleeh committed Feb 13, 2023
1 parent 7d0ac0f commit 6cd36f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "umomega/media",
"description": "Media Scaffold For umΩ Apps",
"keywords": ["umomega", "laravel", "media", "php"],
"version": "1.2.0",
"version": "1.3.0",
"license": "MIT",
"authors": [
{
Expand Down
4 changes: 2 additions & 2 deletions src/Medium.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function getPublicUrlAttribute()
{
if($this->type === 'embed') return $this->path;

return url(upload_path($this->path));
return asset(upload_path($this->path));
}

/**
Expand All @@ -115,7 +115,7 @@ public function getLocalesAttribute()
* @return string
*/
public function imageURLFor($filter, $path = null) {
return url(config('imagecache.route') . '/' . $filter . '/' . ($path ?: $this->path));
return asset(config('imagecache.route') . '/' . $filter . '/' . ($path ?: $this->path));
}

/**
Expand Down

0 comments on commit 6cd36f6

Please sign in to comment.