File "AddressBookUserResource.php"
Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/app/Http/Resources/Admin/AddressBookUserResource.php
File size: 1.09 KB
MIME-type: text/x-php
Charset: utf-8
<?php
namespace App\Http\Resources\Admin;
use Illuminate\Http\Resources\Json\JsonResource;
class AddressBookUserResource extends JsonResource
{
public function toArray($request)
{
// return parent::toArray($request);
return [
"id" => $this->id,
"company_name" => $this->company_name,
"primary_contact_name" => $this->primary_contact_name,
"primary_contact_email" => $this->primary_contact_email,
"secondary_contact_name" => $this->secondary_contact_name,
"secondary_contact_email" => $this->secondary_contact_email,
"address_line_1" => $this->address_line_1,
"address_line_2" => $this->address_line_2,
"city" => $this->city,
"state" => $this->state?->name,
"zipcode" => $this->zipcode,
"phone_number" => $this->phone_number,
"is_default" => $this->is_default,
];
}
}