Add a badge for stock
This commit is contained in:
1 parent
0db4bacff4
commit
a6b108cb74
5 files changed
+35
-14
No files matched your search
@@ -11,7 +11,10 @@ final class IndexController extends BaseController
|
||||
#[Route('/', name: 'app_home')]
|
||||
public function __invoke(): Response
|
||||
{
|
||||
$products = Product::with('price')->orderByDesc('starred')->orderByDesc('created_by')->get();
|
||||
$products = Product::with(['currentStock', 'price'])
|
||||
->orderByDesc('starred')
|
||||
->orderByDesc('created_by')
|
||||
->get();
|
||||
return $this->render('productList.html.twig', ['products' => $products]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user