skip to Main Content

The chart gets the wrong months using laravel /ajax – Jquery ajax

I'm trying to display data on a chart using laravel. So I'm using the following code : Controller : $contrats_par_mois = Contrat::select(DB::raw("COUNT(*) as count")) ->whereYear('date_signature', date('Y')) ->groupBy(DB::raw("Month(date_signature)")) ->pluck('count'); My view : <div class="card-body"> <h5 class="card-title">Sales</h5> <div id="container"></div> </div> Script :…

VIEW QUESTION
Back To Top
Search