#AlpineJS data in a blade view
3 messages · Page 1 of 1 (latest)
It seemed a bit further away then I thought; using html_entity_decode did the trick.
@trim raptor You will want to do this: https://laravel.com/docs/10.x/blade#rendering-json
3 messages · Page 1 of 1 (latest)
Doing something like...
<div x-data="{ loading: false, items: {{ $items }} }"></div>
... works, but characters like - (en dash) show up like –.
How do I fix this? Using {!! $items !!}} or @json($items) did not fix it.
It seemed a bit further away then I thought; using html_entity_decode did the trick.
@trim raptor You will want to do this: https://laravel.com/docs/10.x/blade#rendering-json