33 lines
588 B
PHP
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();
|
|
}
|
|
}
|