Update StatusTransformer

This commit is contained in:
Daniel Supernault 2019-09-26 22:19:41 -06:00
parent 2532663295
commit 5d97fc8776
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -58,7 +58,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) {
return Cache::remember('mastoapi:status:transformer:media:attachments:'.$status->id, now()->addDays(14), function() use($status) {
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());