Edward Yang 2022-08-15 10:46:32 +08:00
parent 0935d95e97
commit 41c84432ef
1 changed files with 6 additions and 1 deletions

View File

@ -28,7 +28,12 @@ class MenusController extends Controller
public function latestProducts()
{
$products = ProductRepo::getBuilder()->whereHas('master_sku')->with('inCurrentWishlist')->orderByDesc('updated_at')->paginate(40);
$products = ProductRepo::getBuilder(['active' => 1])
->whereHas('master_sku')
->with('inCurrentWishlist')
->orderByDesc('updated_at')
->paginate(40);
$data = [
'products' => $products,
'items' => ProductSimple::collection($products)->jsonSerialize(),