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

Make Javascript Variable Null – Jquery ajax

I have one variable in Jquery it which I am assigning the value at a button click. Now after the successful execution of the code, I want to make the variable null. $("#btnAdd").click(function () { var myDataVariable= {}; myDataVariable.dataOne="SomeData"; myDataVariable.dataTwo="SomeData";…

VIEW QUESTION
Back To Top
Search