fix: image media

This commit is contained in:
2025-11-27 10:57:11 +03:30
parent 626a95dc57
commit 6f60a2627d
3 changed files with 39 additions and 12 deletions
+8
View File
@@ -11,4 +11,12 @@ class Image extends Model
public function user() {
return $this->belongsTo(User::class);
}
public function getUrlAttribute()
{
return asset('storage/' . $this->path);
}
// Make sure the URL is included when serializing
protected $appends = ['url'];
}