Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function transform(Media $media): array |
||
19 | { |
||
20 | return $this->escape([ |
||
21 | 'id' => (int) $media->getKey(), |
||
22 | 'name' => (string) $media->name, |
||
23 | 'file_name' => (string) $media->file_name, |
||
24 | 'mime_type' => (string) $media->mime_type, |
||
25 | 'size' => (string) $media->getHumanReadableSizeAttribute(), |
||
26 | 'created_at' => (string) $media->created_at, |
||
27 | 'updated_at' => (string) $media->updated_at, |
||
28 | 'delete' => (string) route('adminarea.rooms.media.destroy', ['room' => $media->model, 'media' => $media]), |
||
29 | ]); |
||
30 | } |
||
31 | } |
||
32 |