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

@@ -20,7 +20,7 @@ final class DiscontinuedController extends BaseController
$products = Product::where('updated_at', '<', now()->format('Y-m-d'))
->orderByDesc('starred')
->orderByDesc('created_by')
->with(['currentPrice'])
->with(['currentPrice', 'lowestPrice'])
->get();
return $this->render('productList.html.twig', ['products' => $products, 'listType' => 'discontinued']);
}