title: How to resolve BadMethodCallExeption in Laravel (IoC Container)
body: <p>When I add <code>Route::resource('api', 'ApiController');</code> to my <strong>app/Http/routes.php</strong>, I get this error:</p>
  
  <blockquote>
    <p>BadMethodCallException Method [index] does not exist.</p>
  </blockquote>
  
  <p>My api controller looks like this:</p>
  
  <pre><code>&lt;?php
  
      class ApiController extends BaseController
      {     
          public function getIndex()
          {
             echo "No Access";
          }
          public function postIndex()
          {
              // content here ...
          }
          public function check_ban($user, $gameBit, $ip)
          {
              // content here ...
          }
          public function check_balance($userid, $gameid, $serverid)
          {
              // content here ...
          }
          public function purchase_item($xml)
          {
              // content here ...
          }
          public function LoginRequest($xml)
          {
              // content here ...
          }
          public function CurrencyRequest($xml)
          {
              // content here ...
          }
          public function ItemPurchaseRequest($xml)
          {
              // content here ...
          }
      }
  </code></pre>
  
  <p>My api should handle out game login request, buying items, ban check and so on, but I get the error described above.</p>
  
  <p>How do I resolve it please?</p>