add graphs for stats
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user