I have array like this.
$array = ['a' => 1, 'b' => 2];
I want to pass it to Vue But it can not.
<my-component :array="'{!! json_encode($array) !!}'"
></my-component>
But the output is show like this in html.
":1,"b":2}'"="">
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire