DEV Community

Discussion on: Use Laravel charts in Laravel.

Collapse
 
arielmejiadev profile image
Ariel Mejia

you need to add your chart helper

{!! $chart->script() !!}

in the blade file of the view, this error is because it is added to the master blade layout, and if you extends other views from this layout you need to pass the chart variable to any file to extend from this layout, but the correct way is to pass the helper ONLY to your dashboard view not in the layout so it only be required there, I hope it works, happy coding!