在laravel 5.2上使用Lavachart的月份图形计数

Hello i get stuck on this proble, hope you guys can give me some advice to solve this matter. So, i want to show graph that count basen on month, how many keluhan (complain) on that month. so the table will be like january has 3 complain, febuary has 5 complain, etc (example)

public function lihatkeluhan(){
    $halaman="tindaklayanan";
    $keluhan_list=DB::table('keluhans')
    ->select(DB::raw('id,tanggal,produk,username,area,masalah,status'))->get();

    $count = count($keluhan_list); //this still not count based on month
    $population = Lava::DataTable();
    $population->addDateColumn('Year')
               ->addNumberColumn('Keluhan')
               ->addRow(['?',$count]);

    Lava::LineChart('Population', $population, [
        'title' => 'Tahun : 2017',
        ]);

    return view('layanankonsumen.daftarkeluhan',compact('halaman','keluhan_list','lava'));
}

try query like this. it will gives you groupby result with count of that particular month, no need for $count = count($keluhan_list); because you will get count in result.

$keluhan_list=DB::table('keluhans')
    ->select(DB::raw('id,tanggal,produk,username,area,masalah,status,count(*) as count'))
    ->get()
    ->groupBy(function($date) {
          return Carbon::parse($date->created_at)->format('m'); // grouping by months
     });