title: API Resource Laravel
body: <p>I want to understand the concept behind API resource in Laravel.  If I understand the answer I read <a href="https://stackoverflow.com/a/57528645/905494">here</a>. If I have a custom endpoint and there’s apiresource endpoint defined for that controller. Does the apiresource endpoint (like show, store) get called automatically when I call the custom endpoint on the controller?</p>
  
  <p>Example I have this:</p>
  
  <pre><code>Route::post('postorderitems', 'Api\OrderitemsController@postOrderItem')-&gt;middleware('auth:api');
  </code></pre>
  
  <p>If I call it and this is defined:</p>
  
  <pre><code>Route::apiResource('orderitems', 'Api\OrderitemsController')-&gt;middleware('auth:api');
  </code></pre>
  
  <p>Does the store method in <code>OrderitemsController</code> get called automatically?</p>