mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 01:05:36 +00:00
Update StatusTransformer
This commit is contained in:
parent
19617f286c
commit
eb7651e8ef
1 changed files with 4 additions and 3 deletions
|
@ -62,9 +62,10 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
||||||
|
|
||||||
public function includeMediaAttachments(Status $status)
|
public function includeMediaAttachments(Status $status)
|
||||||
{
|
{
|
||||||
|
return Cache::remember('status:transformer:media:attachments:'.$status->id, 1440, function() use($status) {
|
||||||
$media = $status->media()->orderBy('order')->get();
|
$media = $status->media()->orderBy('order')->get();
|
||||||
|
|
||||||
return $this->collection($media, new MediaTransformer());
|
return $this->collection($media, new MediaTransformer());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function includeTags(Status $status)
|
public function includeTags(Status $status)
|
||||||
|
|
Loading…
Reference in a new issue