Add lowest price first draft.
This commit is contained in:
@@ -11,10 +11,10 @@ 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']);
|
||||
}
|
||||
$products = Product::with(['currentStock', 'price'])
|
||||
// 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')
|
||||
->get();
|
||||
|
||||
Reference in New Issue
Block a user