mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
26 lines
617 B
PHP
26 lines
617 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class OrderTrackingResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'tracking_no' => $this->tracking_no,
|
|
'tracking' => $this->tracking_english . ($this->remark_english ? " (" . $this->remark_english . ")" : ''),
|
|
'tracking_time' => $this->tracking_time,
|
|
];
|
|
}
|
|
}
|