|
|
@ -15,6 +15,7 @@ class StatusStatelessTransformer extends Fractal\TransformerAbstract
|
|
|
|
{
|
|
|
|
{
|
|
|
|
protected $defaultIncludes = [
|
|
|
|
protected $defaultIncludes = [
|
|
|
|
'account',
|
|
|
|
'account',
|
|
|
|
|
|
|
|
'tags',
|
|
|
|
'media_attachments',
|
|
|
|
'media_attachments',
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
@ -72,6 +73,13 @@ class StatusStatelessTransformer extends Fractal\TransformerAbstract
|
|
|
|
return $this->item($account, new AccountTransformer());
|
|
|
|
return $this->item($account, new AccountTransformer());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function includeTags(Status $status)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$tags = $status->hashtags;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this->collection($tags, new HashtagTransformer());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function includeMediaAttachments(Status $status)
|
|
|
|
public function includeMediaAttachments(Status $status)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return Cache::remember('status:transformer:media:attachments:'.$status->id, now()->addMinutes(3), function() use($status) {
|
|
|
|
return Cache::remember('status:transformer:media:attachments:'.$status->id, now()->addMinutes(3), function() use($status) {
|
|
|
|