mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
31 lines
775 B
PHP
31 lines
775 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,
|
|
'company_id' => $this->company_id,
|
|
'street_one' => $this->street_one,
|
|
'street_two' => $this->street_two,
|
|
'city' => $this->city,
|
|
'state' => $this->state,
|
|
'post_code' => $this->post_code,
|
|
'country' => $this->country,
|
|
'default' => (int) $this->default,
|
|
'billing' => (int) $this->billing
|
|
];
|
|
}
|
|
}
|