You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
974 B
36 lines
974 B
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\Resource;
|
|
|
|
class ShopAddress extends Resource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
"id"=>$this->id,
|
|
"name"=> $this->user_name,
|
|
"country_id"=> $this->country_id,
|
|
"country"=> $this->country,
|
|
"province_id"=> $this->province_id,
|
|
"province_name"=> $this->province,
|
|
"city_id"=> $this->city_id,
|
|
"city_name"=> $this->city,
|
|
"district_id"=> $this->district_id,
|
|
"district_name"=> $this->district,
|
|
"address"=> $this->address,
|
|
"mobile"=> $this->mobile,
|
|
"is_default"=> $this->is_default,
|
|
"full_region"=> $this->province.' '.$this->city.' '.$this->district.' ' ,
|
|
];
|
|
}
|
|
|
|
}
|