laravel passing data to javascript code example
Example: laravel variable in javascript
<script>
var data = {!! json_encode($data, JSON_HEX_TAG) !!};
</script>
<script>
var data = {!! json_encode($data, JSON_HEX_TAG) !!};
</script>