Dashboard sipadu mbip
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace App\Http\Resources;
  3. use Illuminate\Http\Resources\Json\JsonResource;
  4. class CompoundResource 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 [
  15. '_id' => $this->_id,
  16. 'jenis' => $this->jenis,
  17. 'kpd' => $this->kpd,
  18. 'no_plate' => $this->no_plate,
  19. 'nric' => $this->identity,
  20. 'no_daftar_syarikat' => $this->no_daftar_syarikat,
  21. 'nama' => $this->nama,
  22. 'tarikh_masa' => $this->created_at->format('d/m/Y H:i:s A'),
  23. 'kesalahan' => $this->faulty,
  24. 'enforcer' => $this->staffdetail,
  25. 'status' => $this->status,
  26. 'jumlah_asal_kompaun' => $this->jumlah_asal_kompaun,
  27. 'jumlah_kemaskini_kompaun' => $this->jumlah_kemaskini_kompaun,
  28. 'catatan_dari_admin' => $this->catatan_dari_admin,
  29. 'updated_by' => $this->updateby,
  30. 'amount_payment' => $this->amount_payment,
  31. 'created_at' => $this->created_at->format('Y-m-d H:i:s'),
  32. 'updated_at' => $this->updated_at->format('Y-m-d H:i'),
  33. ];
  34. }
  35. }