fix date format

This commit is contained in:
omair saleh
2021-06-17 15:31:52 +08:00
parent cba54e69a3
commit 3efda9652b
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ class DocumentResource extends JsonResource
'document_type' => $this->document_type,
'owner' => new CompanyResource($this->whenLoaded('owner')),
'files' => FileResource::collection($this->files),
'created_at' => Carbon::parse($this->created_at)->setTimezone('UTC')->format('d-m-Y H:s:i')
'created_at' => Carbon::parse($this->created_at)->format('d-m-Y h:i:s A')
];
}
}
+2 -3
View File
@@ -15,7 +15,6 @@ class TransactionResource extends JsonResource
*/
public function toArray($request)
{
return [
'id' => $this->id,
'booking' => new BookingResource($this->booking),
@@ -29,8 +28,8 @@ class TransactionResource extends JsonResource
'status' => (int) $this->status,
'details' => TransactionDetailResource::collection($this->transactionDetails),
'documents' => new DocumentResource($this->documents()->first()),
'expires_on' => Carbon::parse($this->expires_on)->format('d-m-Y H:s:i'),
'updated_at' => Carbon::parse($this->updated_at)->format('d-m-Y H:s:i')
'expires_on' => Carbon::parse($this->expires_on)->format('d-m-Y h:i:s A'),
'updated_at' => Carbon::parse($this->updated_at)->format('d-m-Y h:i:s A')
];
}
}