Fix on invoices, add delivery reference, wip on dashboard concurrency requests designed on template
This commit is contained in:
@@ -7,12 +7,17 @@ use App\Models\Shop\Homepage;
|
||||
class Dashboards
|
||||
{
|
||||
|
||||
public static function getStats()
|
||||
public static function getStats($start, $end)
|
||||
{
|
||||
return [
|
||||
'orders_count' => Orders::countByMonth(),
|
||||
'orders_sum' => Orders::sumByMonth(),
|
||||
'orders_avg' => Orders::avgByMonth(),
|
||||
'orders_count' => Orders::countByPeriod($start, $end),
|
||||
'orders_sum' => Orders::sumByPeriod($start, $end, 'total_shipped'),
|
||||
'orders_avg' => Orders::avgByPeriod($start, $end, 'total_shipped'),
|
||||
'offers_count' => Offers::count(),
|
||||
'clients_count' => Customers::count(),
|
||||
'preparationLess24H' => Orders::countInPreparationLess24H(),
|
||||
'preparationLess48H' => Orders::countInPreparationLess48H(),
|
||||
'preparationMore48H' => Orders::countInPreparationMore48H(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user