ProjectDetailResource.php 925 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Http\Resources\API;
  3. use Illuminate\Http\Request;
  4. use Illuminate\Http\Resources\Json\JsonResource;
  5. class ProjectDetailResource extends JsonResource
  6. {
  7. /**
  8. * Transform the resource into an array.
  9. *
  10. * @return array<string, mixed>
  11. */
  12. public function toArray(Request $request): array
  13. {
  14. return [
  15. 'id' => $this->id,
  16. 'name' => $this->name,
  17. 'code' => $this->code,
  18. 'status' => $this->status,
  19. 'const' => $this->const,
  20. 'begin' => $this->begin,
  21. 'end' => $this->end,
  22. 'available_days' => $this->available_days,
  23. 'latitude' => $this->latitude,
  24. 'longitude' => $this->longitude,
  25. 'type' => $this->type,
  26. 'acl' => $this->acl,
  27. //'whitelist' => $this->whitelist,
  28. 'description' => $this->description,
  29. ];
  30. }
  31. }