Add the lowest price column to every product list view

This commit is contained in:
Krzysztof Płaczek
2025-05-14 10:28:58 +02:00
parent beb717f9b9
commit 7352eea270
6 changed files with 11 additions and 10 deletions

View File

@@ -21,7 +21,7 @@ final class NewController extends BaseController
$products = Product::where('created_at', '>', now()->modify('-30 days')->format('Y-m-d'))
->orderByDesc('starred')
->orderByDesc('created_by')
->with(['currentPrice'])
->with(['currentPrice', 'lowestPrice'])
->get();
return $this->render('productList.html.twig', ['products' => $products, 'listType' => 'new']);
}