Actually i wanted to display 5 largest values from a column numberofclick in my database and create graphs for these top 5 data and also when howered shows id from id column so far i have done this....... im using laravel 5.2 and chart.js this is my controller
$click = Click::select(DB::raw("(numberofclick) as count"))
->orderBy("numberofclick")
->groupBy(DB::raw("(numberofclick)"))
->get()->toArray();
$click = array_column($click, 'count');
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2ahnKtF
via IFTTT
Aucun commentaire:
Enregistrer un commentaire