'Laravel 7: Order quantity data does not appear on the HighChart graph

I currently have an information system project with a graph on the admin dashboard. When I run it on localhost, the data appears on the graph, but it doesn't appear anymore after hosting it even though I didn't change the code.

graphics on hosting page

graphics on localhost

function on controller

Controller

public function index()
{
    $bookings = Booking::all();
    $pesanans = Pesanan::all();
    $models = Modell::all();
    $pelanggan = User::all();

    $pesananData = Pesanan::select(\DB::raw("COUNT(*) as count"))
        ->groupBy(\DB::raw("Month(created_at)"))
        ->pluck('count');

    $bulan = Pesanan::select(\DB::raw("MONTHNAME(created_at) as bulan"))
        ->orderBy(\DB::raw("Month(created_at)", "desc"))
        ->groupBy(\DB::raw("MONTHNAME(created_at)"))
        ->pluck('bulan');

    return view('/dashboard', compact('bookings', 'pesanans',
        'models', 'pelanggan', 'pesananData', 'bulan'));
}

View javascript for highchart

     <!-- HIGH CHART -->
     <div class="card-11">
      <div class="card-body">
        <div id="container"></div>
      </div>
     </div>

0

when the var $pesanandata variable is in dd($pesanandata) in the view, the data is there but can't be displayed on the graph array for $pesanandata

data for array $pesanandata data for arrray $bulan



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source