Files
portal/app/Http/Resources/PackageResource.php
T
2021-07-23 12:41:06 +08:00

32 lines
795 B
PHP

<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class PackageResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'id' => $this->id,
'order_id' => $this->order_id,
'claimant_id' => $this->claimant_id,
'type' => $this->type,
'description' => $this->description,
'width' => $this->width,
'height' => $this->height,
'length' => $this->length,
'weight' => $this->weight,
'quantity' => $this->quantity,
'status' => $this->status,
];
}
}