Files
Omair Saleh fc7bbe686d large commit
2019-10-08 11:17:46 +08:00

33 lines
846 B
PHP

<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class AddressBook extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'id' => $this->id,
'type' => $this->type,
'company_id' => $this->reference_id,
'reference' => $this->reference,
'contact' => $this->contact,
'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
];
}
}