Add indexes to the database.

This commit was merged in pull request #60.
This commit is contained in:
2026-02-05 08:40:34 +01:00
parent a545bfe2ab
commit 67019e3933
3 changed files with 57 additions and 9 deletions

View File

@@ -14,11 +14,11 @@ final class IndexController extends BaseController
if ($this->cache->getItem('list_all')->isHit()) {
return $this->render('productList.html.twig', ['listType' => 'all']);
}
$products = Product::with(['currentStock'])
->orderByDesc('starred')
$products = Product::orderByDesc('starred')
->orderByDesc('created_by')
->get();
return $this->render('productList.html.twig', ['products' => $products, 'listType' => 'all']);
}
}