lists → pluck for Laravel 5.5

This commit is contained in:
Toby Zerner 2017-12-27 16:06:27 +10:30
parent a1fe93f355
commit cd2d56fd99

View File

@ -92,7 +92,7 @@ class AddStatisticsData
->selectRaw('COUNT(id) as count')
->where($column, '>', new DateTime('-24 months'))
->groupBy('time_group')
->lists('count', 'time_group');
->pluck('count', 'time_group');
// Now that we have the aggregated statistics, convert each time group
// into a UNIX timestamp.