title: Laravel resource controller ajax call
body: <p>Using Laravel 4.2, I have a resource controller setup like this:</p>
  
  <pre><code>Route::resource('faq', 'ProductFaqController');
  </code></pre>
  
  <p>When I hit the <code>/faq</code> URL on my server, the controller's <code>index()</code> method correctly loads. </p>
  
  <p>In a js file, I would like to make an ajax call to one of the other actions for this resource controller, for example, the <code>store</code> action. Therefore, I do something like this:</p>
  
  <pre><code> $.ajax({
      url:'store',
      dataType:'json',
      success:function(data){
          console.log(data);
      }
  });
  </code></pre>
  
  <p>The problem I'm having is that since the URL is <code>/faq</code> (without a trailing slash), the ajax call gets made to <code>/store</code>, instead of <code>/faq/store</code>.  </p>
  
  <p>Am I missing something here or do I need to prefix the url for all of my ajax calls with the route?</p>
  
  <p>If I do need to add some sort of prefix, how do I get the appropriate prefix to use no matter resource controller is being called?</p>