return a blank string when name attribute
This commit is contained in:
@@ -206,8 +206,12 @@ class Media extends Model
|
|||||||
*/
|
*/
|
||||||
public function getUrlAttribute()
|
public function getUrlAttribute()
|
||||||
{
|
{
|
||||||
$url = config("filesystems.disks.$this->storage.url");
|
if(isset($this->attributes['name'])) {
|
||||||
return "$url/$this->name";
|
$url = config("filesystems.disks.$this->storage.url");
|
||||||
|
return "$url/$this->name";
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user