mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 04:23:59 +00:00
26 lines
555 B
PHP
26 lines
555 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class AirShipmentItemPriceResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
$object = $this->resource;
|
|
$detailsArray = (array)json_decode($object['details']);
|
|
|
|
return [
|
|
'name' => $detailsArray['name'],
|
|
'details' => $object['details'],
|
|
];
|
|
}
|
|
}
|