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

Countdown For WooCommerce Products

I create function to get the date and turn it to countdown. This my function code: function countdown() { global $product; $start = get_post_meta( get_the_ID() , 'yung_product_date_start', true ); $end = get_post_meta( get_the_ID() , 'yung_product_date_end', true ); if ( $start…

VIEW QUESTION
Back To Top
Search