📌  相关文章
📜  在 laravel 中获取过去 24 小时的记录 - PHP 代码示例

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

代码示例1
Method # 1
 Mood::where('created_at', '>=', Carbon::now()->subDay())->get();

Method # 2
 Mood::whereBetween('created_at', [now()->subMinutes(1440), now()])->get();