diff --git a/beike/Shop/Http/Controllers/BrandController.php b/beike/Shop/Http/Controllers/BrandController.php index 41680ae2..fe4929eb 100644 --- a/beike/Shop/Http/Controllers/BrandController.php +++ b/beike/Shop/Http/Controllers/BrandController.php @@ -20,7 +20,14 @@ class BrandController extends Controller public function show(int $id) { - $products = BrandRepo::find($id)->products()->with('inCurrentWishlist')->paginate(20); + $products = BrandRepo::find($id) + ->products() + ->with([ + 'master_sku', + 'description', + 'inCurrentWishlist' + ]) + ->paginate(20); $data = [ 'products' => ProductSimple::collection($products)->jsonSerialize(),