CustomerService.php 316 B

12345678910111213141516
  1. <?php
  2. namespace app\admin\service\statistics;
  3. use app\model\Customer;
  4. class CustomerService
  5. {
  6. public static function getCustomer()
  7. {
  8. $todayTimeUnix = strtotime(date('Y-m-d'));
  9. $data['todayCount'] = Customer::where('created_at', '>', $todayTimeUnix)->count();
  10. return $data;
  11. }
  12. }