6
0
Fork 0
jiqu-library-server/app/Endpoint/Api/Http/Resources/ShippingAddressResource.php

28 lines
706 B
PHP

<?php
namespace App\Endpoint\Api\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class ShippingAddressResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
return [
'id' => $this->id,
'zone_id' => $this->zone_id,
'name' => $this->name,
'telephone' => $this->telephone,
'zone' => $this->zone,
'address' => $this->address,
'is_default' => $this->is_default,
];
}
}