Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Product1 200 visits
- product5 30 visits
- product10 47visits
- $chartjson = Pagevisit::all()->toJson();
- $chartjsontitle =
- DB::table('products')
- ->join('page-visits', function ($join) {
- $join->on('products.id', '=', 'page-visits.visitable_id');
- })->get();
- $value = collect($chartjsontitle)->toArray();
- $chart4 = Charts::database($chartjson, 'bar', 'highcharts')
- ->elementLabel("Total")
- ->dimensions(1000, 500)
- ->responsive(false)
- ->values('visitable_id')
- ->labels($value);
Add Comment
Please, Sign In to add comment