WIP: storage-fix-local-nas work before playlist controls feature
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
1 parent
6b3ab5b65e
commit
c160242dbc
46 files changed
+5365
-815
No files matched your search
+5
-1
@@ -46,6 +46,10 @@ class Post extends Model
|
||||
|
||||
public function getImageUrlAttribute(): ?string
|
||||
{
|
||||
return $this->image ? asset('storage/post_images/' . $this->image) : null;
|
||||
if (! $this->image) return null;
|
||||
if (str_starts_with($this->image, 'users/')) {
|
||||
return route('media.post-image', $this->image);
|
||||
}
|
||||
return asset('storage/post_images/' . $this->image);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user