优化品牌页面产品列表读取性能
This commit is contained in:
parent
d387d49da9
commit
2cc9159f94
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue