title: PHP Laravel @include javascript variable not found
body: <p>Laravel how o can use javascript variables from include file? I try this below example but variable not found..</p>
  
  <p><strong>includeFile.blade.php</strong></p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function () {
          var myMar = "Hello world";
      });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>default.blade.php</strong></p>
  
  <pre><code>@include('layouts.includeFile')
  
  &lt;script&gt;
      $(document).ready(function () {
          alert(myVar); //Here myVar is undefined
      });
  &lt;/script&gt;
  </code></pre>