You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.5 KiB

2 years ago
  1. <?php
  2. namespace App\Http\Resources;
  3. use Illuminate\Http\Resources\Json\JsonResource;
  4. class CollectionResource extends JsonResource
  5. {
  6. /**
  7. * Transform the resource into an array.
  8. *
  9. * @param \Illuminate\Http\Request $request
  10. * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
  11. */
  12. public function toArray($request)
  13. {
  14. return [
  15. "id" => $this->id,
  16. "name" => $this->name,
  17. "public" => $this->public,
  18. "disk" => $this->disk,
  19. "count" => $this->count,
  20. "tmp_support" => $this->tmp_support,
  21. "remove_tmp_time" => $this->remove_tmp_time,
  22. "max_file_size" => $this->max_file_size,
  23. "min_file_size" => $this->min_file_size,
  24. "max_width" => $this->max_width,
  25. "min_width" => $this->min_width,
  26. "max_height" => $this->max_height,
  27. "min_height" => $this->min_height,
  28. "alt_required" => $this->alt_required,
  29. "description_required" => $this->description_required,
  30. "count" => $this->count,
  31. "exts" => $this->exts,
  32. "avalible_exts" => $this->avalible_exts,
  33. "memetypes" => $this->memetypes,
  34. "model" => $this->model,
  35. "expire_date" => $this->expire_date,
  36. "created_at" => $this->created_at,
  37. "updated_at" => $this->updated_at,
  38. "deleted_at" => $this->deleted_at
  39. ];
  40. }
  41. }