title: Laravel delete item from table list / db
body: <p>I am trying to delete item from a generated table of items which are from a database table.</p>
  
  <p>My Route:</p>
  
  <pre><code>Route::delete('destroy/{deviceID}', ['as' =&gt; 'destroyDevice', 'uses' =&gt; 'DeviceController@destroyDevice']);
  </code></pre>
  
  <p>My Controller method to delete an item:</p>
  
  <pre><code>public function destroyDevice(Request $request, $deviceId = 0)
  {
      $device = Device::find($deviceId);
  
      if($device)
      {
          $device-&gt;delete();
          return redirect()-&gt;route('index')-&gt;with('success', 'Erfolgreich gelöscht');
      }
      else
      {
          return redirect()-&gt;route('index')-&gt;with('error', 'Fehler');
      }
  }
  </code></pre>
  
  <p>And my blade template:</p>
  
  <pre><code>                &lt;form action="{{ route('destroyDevice', $deviceValue-&gt;id) }}" method="post" name="delete_device"&gt;
                      &lt;input type="hidden" name="_method" value="delete"&gt;
                      &lt;input type="hidden" name="_token" value="{{ csrf_token() }}"&gt;
                      &lt;input type="hidden" name="id" value="{{ $deviceValue-&gt;id }}"&gt;
                      &lt;td&gt;
                          &lt;button type="submit" class="btn btn-danger" name="destroy_device"&gt;
                              &lt;span class="glyphicon glyphicon-trash"&gt;&lt;/span&gt;
                          &lt;/button&gt;
                      &lt;/td&gt;
                  &lt;/form&gt;
  </code></pre>
  
  <p>If I click on the button nothing happens no error no Response, what am I doing wrong.</p>
  
  <p>If I click on the third delete button the form holds this:</p>
  
  <pre><code>&lt;form action="http://localhost/app/public/device/destroy/3" method="post" name="delete_device"&gt;&lt;/form&gt;
  </code></pre>