Create company info table, insert data into company info, update companyResource when businessType is online shop

This commit is contained in:
Uwais Al-Qarni
2022-05-16 14:55:05 +08:00
parent 87c79fbf7d
commit e9114670ed
12 changed files with 475 additions and 19 deletions
+3
View File
@@ -66,6 +66,9 @@ class CompanyResource extends JsonResource
$this->mergeWhen($this->business_type === BusinessType::CURRENCY_VENDOR, [
'currencies' => $segment ? CurrencyResource::collection(Currency::whereIn('id', $segment->detail->currencies)->get()) : [],
'service_charge' => $serviceCharge
]),
$this->mergeWhen($this->business_type === BusinessType::ONLINE_SHOP, [
'company_infos' => new CompanyInfoResource($this->infos)
])
];