作者 lyh

gx

... ... @@ -148,10 +148,9 @@ class ComController extends BaseController
public function ceshi(){
$currentDateTime = Carbon::now();
$startTime = $currentDateTime->subMonth()->startOfMonth();
$startTime = Carbon::now()->subMonth()->startOfMonth();
// 获取上个月的结束时间
$endTime = $startTime->copy()->subMonth()->endOfMonth();
$endTime = Carbon::now()->subMonth(1)->endOfMonth();
$pv = DB::table('gl_count')
->where(['project_id'=>1])
->where('date','>=',$startTime->toDateString().' 00:00:00')
... ...