ImageResource.php 578 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace App\Http\Resources;
  3. use Illuminate\Http\Resources\Json\Resource;
  4. class ImageResource extends Resource
  5. {
  6. /**
  7. * Transform the resource into an array.
  8. *
  9. * @param \Illuminate\Http\Request $request
  10. * @return array
  11. */
  12. public function toArray($request)
  13. {
  14. return [
  15. 'id' => $this->id,
  16. 'type' => $this->type,
  17. 'path' => $this->path,
  18. 'user_id' => $this->user_id,
  19. 'created_at' => $this->created_at,
  20. 'updated_at' => $this->updated_at,
  21. ];
  22. }
  23. }