title: getting ID of anchor tag and put it inside laravel 4.2 session
body: <p>hello i have these set of div where the user clicks an anchor tag inside it and that anchor tag has an id. I needed to get that id and use it do display records in a modal in the same so far here is my code </p>
  
  <p>the anchor tag</p>
  
  <pre><code>&lt;a id="{{$num}}" class="modal-trigger z-depth-1 btn dgray " onclick="cModal(this.id);" href="{{ URL::to('#modFile')}}"&gt;
  </code></pre>
  
  <p>this anchor tag calls a function to get its id and here is it</p>
  
  <pre><code>       function cModal(id)
         {
          alert(id);
  
          &lt;?php $val = "&lt;script&gt;var x = id;&lt;/script&gt;"; ?&gt;
          {{ Session::put('NID' , $val) }}
         }
  </code></pre>
  
  <p>see what im trying to do here is create a laravel session inside and put the acquired id inside but the problem is the id is a javascript variable. any ideas on how i can get that id and put it inside a session? thanks in advance!</p>