title: The DELETE & PUT method is not supported for this route. Supported methods: GET, HEAD,POST
body: <p>I need your help guys on this, my app can't delete neither can it Update. it keeps on popping these errors on my edit and Delete Buttons;</p>
  
  <pre><code>(1/1) MethodNotAllowedHttpException
  The DELETE method is not supported for this route. Supported methods: GET, HEAD.
  
  
  
  (1/1) MethodNotAllowedHttpException
  The PUT method is not supported for this route. Supported methods: GET, HEAD.
  </code></pre>
  
  <p>this is my route</p>
  
  <pre><code>Route::group(['middleware' =&gt; ['role:Admin']], function () {
      Route::resource('/device', 'DeviceController');
  });
  </code></pre>
  
  <p>this is my edit blade </p>
  
  <pre><code>&lt;form action="/device" method="POST" id="editForm"&gt;
    {{csrf_field()}}
    {{ method_field('PUT') }}
  
     &lt;div class="col-md-4 mb-3"&gt;
     &lt;label&gt;Serial Number&lt;/label&gt;
       &lt;input type="text" name="Serial_No" id="" class="form-control"  placeholder="Enter Serial number"&gt;
     &lt;/div&gt;
  
    &lt;button class="btn btn-primary" type="submit"&gt;Add Data&lt;/button&gt;
    &lt;button type="reset" class="btn btn-default float-right"&gt;Cancel&lt;/button&gt;
     &lt;button type="reset" class="btn btn-default float-middle"&gt;Clear&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This is my delete blade</p>
  
  <pre><code>     &lt;form action="/device" method="POST" id="deleteForm"&gt;
              {{csrf_field()}}
              {{method_field('DELETE')}}
  
               &lt;div class="form-row"&gt;
               &lt;input type="hidden" name="_method" value="DELETE" &gt;
               &lt;P&gt;Are You Sure!.. You want to delete this Device?&lt;/P&gt;
               &lt;/div&gt;
  
         &lt;button class="btn btn-primary " type="submit" &gt;YES! DELETE DEVICE&lt;/button&gt;
         &lt;button type="button" class="btn btn-secondary float-right" data-dismiss="modal" &gt;CANCEL&lt;/button&gt;
  
        &lt;/form&gt;
  </code></pre>
  
  <p>This is my controller for delete</p>
  
  <pre><code>public function destroy($id)
      {
          $devices = Device::find($id);
          $devices -&gt; delete();
          return Redirect::back() -&gt; with('success','Data Deleted Successfully');
      }
  </code></pre>
  
  <p>This is my script that deletes</p>
  
  <pre><code>&lt;script&gt;
  //Start Delete Record
  
          table.on('click', '.delete', function () {
  
          $tr = $(this).closest('tr');
          if ($($tr).hasClass('child')) {
            $tr = $tr.prev('.parent');
          }
  
          var data = table.row($tr).data();
          console.log(data);
  
          $('#deleteForm').attr('action', '/laptops/'+data[0]);
          $('#deleteModal').modal('show');
          });
          //End Delete Record
  
        });
  &lt;/script&gt;
  </code></pre>