add new metrics, graph metrics, prepare basket to storage

This commit is contained in:
ludo
2024-01-29 23:44:49 +01:00
parent 72f5da4555
commit 84bc5f2e67
12 changed files with 219 additions and 214 deletions

View File

@@ -22,4 +22,14 @@ class OfferStocks
{
return Offers::getField($id, 'stock_current');
}
public static function getAlerts()
{
return Offer::active()->where('stock_current', '<', 15)->get();
}
public static function countAlerts()
{
return Offer::active()->where('stock_current', '<', 15)->count();
}
}