new: copy remaining company module classes from exhange2.0.

This commit is contained in:
weichien00
2021-07-08 03:31:33 +08:00
parent 8da79a2017
commit 10a7bd3421
32 changed files with 1391 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?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
];
}
}