1
0
Fork 0

Update StatusTransformer, add photo:video:album to media attachments

This commit is contained in:
Daniel Supernault 2019-06-18 00:00:43 -06:00
parent 9d417624b6
commit 1cd58559f5
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
public function includeMediaAttachments(Status $status)
{
return Cache::remember('status:transformer:media:attachments:'.$status->id, now()->addDays(14), function() use($status) {
if(in_array($status->type, ['photo', 'video', 'photo:album', 'loop'])) {
if(in_array($status->type, ['photo', 'video', 'photo:album', 'loop', 'photo:video:album'])) {
$media = $status->media()->orderBy('order')->get();
return $this->collection($media, new MediaTransformer());
}