how to pass data from javascript to phph laravel 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>