📜  在 laravel 中根据月份和年份获取数据 - PHP 代码示例

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

代码示例2
$post = Mjblog::whereYear('created_at', '=', $year)
              ->whereMonth('created_at', '=', $month)
              ->get();