Compare commits
2 Commits
b2c4ba053f
...
67e59a6f3a
| Author | SHA1 | Date | |
|---|---|---|---|
| 67e59a6f3a | |||
| 173a03b83d |
@@ -7,6 +7,7 @@ use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class ArticlePicture extends Model
|
||||
{
|
||||
|
||||
use BelongsToCategory;
|
||||
|
||||
public function setPicturesAttribute($pictures)
|
||||
@@ -27,7 +28,11 @@ class ArticlePicture extends Model
|
||||
if (empty($cover)) {
|
||||
return '';
|
||||
} else {
|
||||
return Storage::disk('public')->url($cover[0]);
|
||||
foreach ($cover as $item) {
|
||||
return Storage::disk('public')->url($item);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user