📜  laravel 获取上个月记录 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:00.096000             🧑  作者: Mango

代码示例3
$fromDate = Carbon::now()->subMonth()->startOfMonth()->toDateString();
$tillDate = Carbon::now()->subMonth()->endOfMonth()->toDateString();

$revenueLastMonth = Callback::whereBetween('created_at',[$fromDate,$tillDate])->get();