mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-19 12:34:03 +00:00
27 lines
624 B
PHP
27 lines
624 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class Schedule extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'id' => (int)$this->id,
|
|
'ETD' => carbon::parse($this->ETD)->format('d-m-Y'),
|
|
'ETA' => carbon::parse($this->ETA)->format('d-m-Y'),
|
|
'status' => (int)$this->status,
|
|
'issue_remark' => $this->issue_remark
|
|
];
|
|
}
|
|
}
|