Chartjs-JavaScript Error โ€“ Uncaught SyntaxError: Unexpected token {

0๐Ÿ‘

โœ…

You have a typo in your controller:

->with('grosss', $wkRevenue->pluck('gross'));

needs to be:

->with('gross', $wkRevenue->pluck('gross'));

Laravel changed the pluck() method in 5.2 to return a collection instead of an array.

In your view change your json_encode() to:

{!! $gross->toJson() !!}

Leave a comment