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.

FormResource.php 749B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Http\Resources;
  3. use Illuminate\Http\Resources\Json\JsonResource;
  4. class FormResource extends JsonResource
  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 parent::toArray($request);
  15. return [
  16. '_id' => $this->_id,
  17. 'formT' => $this->type_application,
  18. 'type' => $this->type_service,
  19. 'subscriber' => $this->subscriber,
  20. 'work_order' => $this->workorder,
  21. 'created_at' => $this->created_at->format('Y-m-d H:i:s'),
  22. 'updated_at' => $this->updated_at->format('Y-m-d H:i'),
  23. ];
  24. }
  25. }