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

@@ -11,9 +11,9 @@ final class IndexController extends BaseController
#[Route('/', name: 'app_home')]
public function __invoke(): Response
{
// if($this->cache->getItem('list_all')->isHit()) {
// return $this->render('productList.html.twig', ['listType' => 'all']);
// }
if ($this->cache->getItem('list_all')->isHit()) {
return $this->render('productList.html.twig', ['listType' => 'all']);
}
$products = Product::with(['currentStock', 'price', 'lowestPrice'])
->orderByDesc('starred')
->orderByDesc('created_by')