Expand transformers.

This commit is contained in:
James Cole
2018-02-06 19:49:29 +01:00
parent da91645ec0
commit e94043edc2
3 changed files with 100 additions and 15 deletions

View File

@@ -40,7 +40,15 @@ class AttachmentTransformer extends TransformerAbstract
public function transform(Attachment $attachment): array
{
return [
'id' => (int)$attachment->id,
'id' => (int)$attachment->id,
'attachable_type' => $attachment->attachable_type,
'md5' => $attachment->md5,
'filename' => $attachment->filename,
'title' => $attachment->title,
'description' => $attachment->description,
'notes' => $attachment->notes,
'mime' => $attachment->mime,
'size' => $attachment->size,
];
}