laravel chart doesn't get the data from the controller
问题 i'm trying to get data to chart from the database. this how i wanted the data from database get row count according to the month in the date in Laravel so i add that query. this is how controller looks like class DashboardController extends Controller { public function admin() { $suppliers = SupplierData::all(); $repcounter= SalesRep::count(); $totalsales= SalesData::count(); $totalrevenue=SalesData::sum('total_price'); $chartdata = SalesData::selectRaw('COUNT(*) as count, YEAR(dateOfSale)