mercredi 26 avril 2017

How to pass laravel/PHP function to JS

I have a highcharts pie chart, Where i want put laravel's route() helper function.

I have the following code, Which

data: [{
    name: 'Car',
    y: 56.33,
    sliced: true,
    selected: true,
    url: 
}

Which throws SyntaxError: expected property name, got '{'.

What is the best way to pass PHP variable to JS.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire