問題のより明確な解決策: $revenueMonth = Callback::whereMonth( 'created_at', '=', Carbon::now()->subMonth()->month );