title: Is there any way to pass PHP object as JavaScript parameter in HTML?
body: <p>I do project using Laravel 5. I show table from view and I want to when click this link pass it is data value all data to JavaScript function. I am try to several way but cannot do it.</p>
  
  <pre><code>  @foreach ($basl_officers as $basl_officer)
                          &lt;tr&gt;
                              &lt;td&gt;&lt;a href="#"   onClick="functionOne($basl_officer)"  &gt;{{ $basl_officer-&gt;officerName }} &lt;/a&gt;&lt;/td&gt;        
                              &lt;td align='center'&gt;
                                  {!! Form::open(['method' =&gt; 'DELETE', 'route'=&gt;['basl_officers_page.destroy',$basl_officer-&gt;id]]) !!}
                                  &lt;a href="{{route('basl_officers_page.edit',$basl_officer-&gt;id)}}" class="btn btn-default btn-sm"&gt; &lt;span class="glyphicon glyphicon-pencil"&gt;&lt;/span&gt; &lt;/a&gt; &amp;nbsp &amp;nbsp
                                  &lt;button type="submit" class="btn btn-default btn-sm" onclick="return confirm('Are you sure?')"&gt; &lt;span class="glyphicon glyphicon-trash"&gt;&lt;/span&gt; &lt;/button&gt; 
                                  {!! Form::close() !!}
                              &lt;/td&gt;
                          &lt;/tr&gt;
   @endforeach
  </code></pre>
  
  <p>JavaScript Code</p>
  
  <pre class="lang-js prettyprint-override"><code>&lt;script type="text/javascript"&gt;
  function functionOne(x) {
      alert('You clicked the top text' + x);
  }
  function functionTwo() {
      alert('You clicked the bottom text');
  }
  </code></pre>
  
  <p></p>