mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-19 04:24:00 +00:00
27 lines
616 B
PHP
27 lines
616 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class Package extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'description' => $this->description,
|
|
'type' => (int)$this->type,
|
|
'width' => (float)$this->width,
|
|
'length' => (float)$this->length,
|
|
'height' => (float)$this->height,
|
|
'quantity' => (int)$this->quantity
|
|
];
|
|
}
|
|
}
|