Files
opensem/app/Repositories/Shop/CustomerMetrics.php
2024-01-30 23:24:00 +01:00

33 lines
588 B
PHP

<?php
namespace App\Repositories\Shop;
use App\Models\Shop\Customer;
use App\Repositories\Core\DateStats;
use App\Traits\Model\Basic;
class CustomerMetrics
{
use Basic, DateStats;
public static function countOfToday()
{
return Customer::ofToday()->count();
}
public static function countOfLastWeek()
{
return Customer::ofLastWeek()->count();
}
public static function countOfLastMonth()
{
return Customer::ofLastMonth()->count();
}
public static function getModel()
{
return Customer::query();
}
}