add graphs for stats

This commit is contained in:
ludo
2024-01-29 22:39:57 +01:00
parent 75107285e7
commit 9fcc81f4d9
7 changed files with 202 additions and 73 deletions

View File

@@ -4,10 +4,21 @@ namespace App\Repositories\Shop;
use App\Models\Shop\Order;
use App\Repositories\Core\DateStats;
use App\Traits\Model\Basic;
class OrderStatistics
{
use DateStats;
use Basic, DateStats;
public static function getTotalDaily()
{
return self::sumDaily('total_taxed');
}
public static function getTotalMonthly()
{
return self::sumMonthly('total_taxed');
}
public static function countPreparationLess2Days()
{
@@ -49,4 +60,9 @@ class OrderStatistics
{
return Order::ofLastMonth()->sum('total_taxed');
}
public static function getModel()
{
return Order::query();
}
}