|
@@ -34,12 +34,12 @@ class ShopsTransformer extends TransformerAbstract{
|
|
|
'license_img' => $shop['license_img'],
|
|
|
'food_trans_license' => $shop['food_trans_license'],
|
|
|
'other_license' => $shop['other_license'],
|
|
|
- 'proportion' => $shop['proportion'],
|
|
|
+ 'proportion' => floatval($shop['proportion']),
|
|
|
'verify_type' => $shop['verify_type'],
|
|
|
'star' => $shop['star'],
|
|
|
'created_at' => Carbon::parse($shop['created_at'])->format('Y-m-d H:i:s'),
|
|
|
'updated_at' => Carbon::parse($shop['updated_at'])->format('Y-m-d H:i:s'),
|
|
|
- 'shop_account' => $shop->account->toArray(),
|
|
|
+ 'shop_account' => !empty($shop->account) ? $shop->account->toArray() : "",
|
|
|
];
|
|
|
}
|
|
|
}
|