In a Laravel 5 blade template I have a <script>
section.
In this section I need to set a variable to a string that is coming from another blade template.
I tried something like :
<script>
var a = "@include 'sometext.blade.php' ";
</script>
but this obviously doesn't work.
Also, the included blade can contain both single and double quotes, so these need to be escaped somehow, or the Javascript will not be valid.
Any ideas?