title: Laravel 5.4 - Use Controller Route in javascript function
body: <p>I have a table (datatables) and I have an edit icon and I want to call a route with the parameter.</p>
  
  <p>My function is currently is</p>
  
  <pre><code>function editItem(id)
      {
          //alert(id);
      }
  </code></pre>
  
  <p>What I want to do is to call</p>
  
  <pre><code>UsersController@editItem
  </code></pre>
  
  <p>and also pass the id to the controller.</p>
  
  <p>I am a little stuck!</p>