[Chartjs]-A chart Js error issue are occured in my Laravel other page?

1👍

add this in footer.blade.php to check if the current route name is admin.home

@if(Route::currentRouteName() == 'admin.home')
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js" charset="utf-8"></script>
    {!! $chart->script() !!}
    {!! $linechart->script() !!}
@endif

more info about Accessing The Current Route

Hope this helps!

Leave a comment