mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 20:43:56 +00:00
29 lines
688 B
PHP
29 lines
688 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class AddressResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'street_one' => $this->street_one,
|
|
'street_two' => $this->street_two,
|
|
'district' => $this->district,
|
|
'state' => $this->state,
|
|
'post_code' => $this->postcode,
|
|
'country' => $this->country,
|
|
'billing' => (int) $this->billing
|
|
];
|
|
}
|
|
}
|