PickupPointResource.php 936 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace App\Http\Resources\V2;
  3. use Illuminate\Http\Resources\Json\JsonResource;
  4. class PickupPointResource 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. "staff_id" => $this->staff_id,
  17. "name" => $this->name,
  18. "address" => $this->address,
  19. "phone" => $this->phone,
  20. "pick_up_status" => $this->pick_up_status,
  21. "cash_on_pickup_status" => $this->cash_on_pickup_status,
  22. ];
  23. }
  24. public function with($request)
  25. {
  26. return [
  27. 'success' => true,
  28. 'status' => 200
  29. ];
  30. }
  31. }