title: Laravel 5.1 MethodNotAllowedHttpException on store method using Resource Controller
body: <p>I am trying to add a record to a database utilizing a resource controller, however, am getting  MethodNotAllowedHttpException error.  I have gone through several similar questions like <a href="https://stackoverflow.com/questions/29327047/laravel-methodnotallowedhttpexception-on-post-form">this</a> or <a href="https://stackoverflow.com/questions/32785670/methodnotallowedhttpexception-in-routecollection-php-line-219/35017080#35017080">that</a> ,however, none seem to answer me. This is my code:</p>
  
  <p>Routes.php</p>
  
  <pre><code>Route::resource('animals', 'AnimalsCtrl');
  </code></pre>
  
  <p>Part of my model.</p>
  
  <pre><code>protected $table='animals';
  protected $primaryKey='name';
  
  protected $fillable = [
      'name', 'type'
  ];
  </code></pre>
  
  <p>The store method in the controller.</p>
  
  <pre><code>   public function store(Request $request)
      {
          $creature = $request-&gt;all();
          Animal::create($creature);
  
      }
  </code></pre>
  
  <p>This is the form.</p>
  
  <pre><code>        &lt;form method="post"&gt;
              &lt;div class="small-6 small-centered large-4 large-centered columns"&gt;
                  {!! csrf_field() !!}
                  &lt;table&gt;
                      &lt;tr&gt;
                          &lt;th scope="row"&gt;Name&lt;/th&gt;
                          &lt;td&gt;
                              &lt;input type="text" name="name" maxlength="50" required&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;th scope="row"&gt;Type&lt;/th&gt;
                          &lt;td&gt;
                              &lt;input type="text" name="type" maxlength="20" required&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;th&gt;
                              &lt;button type="submit" class="button success"&gt;
                                  &lt;i class="fi-plus"&gt;&lt;/i&gt;
                                  Add Animal
                              &lt;/button&gt;
                          &lt;/th&gt;
                          &lt;td&gt;
                              &lt;a href="{{url('/animals')}}" class="button alert"&gt;
                                  &lt;i class="fi-x-circle"&gt;&lt;/i&gt;
                                  &amp;nbsp; Cancel
                              &lt;/a&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/table&gt;
              &lt;/div&gt;
          &lt;/form&gt;
  </code></pre>
  
  <p>Does anyone have any suggestion on how I can resolve this?</p>