DashboardPrestadorResource.php 973 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Http\Resources;
  3. use Illuminate\Http\Request;
  4. use Illuminate\Http\Resources\Json\JsonResource;
  5. class DashboardPrestadorResource 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. 'headerBar' => data_get($this, 'headerBar'),
  16. 'summaryInfos' => data_get($this, 'summaryInfos'),
  17. 'priceSuggested' => data_get($this, 'priceSuggested'),
  18. 'todayServices' => data_get($this, 'todayServices'),
  19. 'solicitations' => data_get($this, 'solicitations'),
  20. 'nextSchedules' => data_get($this, 'nextSchedules'),
  21. 'opportunities' => data_get($this, 'opportunities'),
  22. 'notifications' => data_get($this, 'notifications'),
  23. 'pendingConfirmation' => data_get($this, 'pendingConfirmation'),
  24. ];
  25. }
  26. }