芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/store.kwesioben.com/app/Http/Controllers/api/v1/DealController.php
1]) ->where(['deal_type' => 'feature_deal'])->first(); $p_ids = array(); if ($featured_deal) { $p_ids = FlashDealProduct::with(['product']) ->whereHas('product', function ($q) { $q->active(); }) ->where(['flash_deal_id' => $featured_deal->id]) ->pluck('product_id')->toArray(); } $products = Product::with(['rating','tags']) ->withCount(['wish_list' => function($query) use($user){ $query->where('customer_id', $user != 'offline' ? $user->id : '0'); }]) ->whereIn('id', $p_ids) ->get(); return response()->json(Helpers::product_data_formatting($products, true), 200); } }