Stack Exchange
The GET method is not supported for this route. Supported methods: DELETE
I got this error when I try to remove subcategories by however I did use the delete method.
blade.php:-
 <form action="{{ url('sub_category/delete',$item->id) }}" method="DELETE">
  <button type="submit" class="btn btn-outline-danger">remove category</button>
 </form>

my web
 Route::DELETE('/sub_category/delete/{id}','SubcategoryController@destroy');

controller:-
 public function destroy($id)
{
    $subcategory= Subcategory::where('id',$id)->delete();

    return redirect()->route('cars.index');
                    // ->with('success','Car deleted successfully');
}


you have to use "form method spoofing" as the HTML forms only support GET/POST ...   https://laravel.com/docs/8.x/routing#form-method-spoofing

try like this one:
 <form action="{{ url('sub_category/delete',$item->id) }}" method="POST">
     {{method_field('DELETE')}}
     @csrf
     <button type="submit" class="btn btn-outline-danger">remove category</button>
 </form>

your route:
Route::delete('/sub_category/delete/{id}','SubcategoryController@destroy');


DELETE,PUT,PATCH,HEAD methods should be defined as follows

@method('DELETE') @method('PUT') ...

Laravel routing
<form action="{{ url('sub_category/delete',$item->id) }}" method="POST">
@method('DELETE')
@csrf
<button type="submit" class="btn btn-outline-danger">remove category</button>
</form>


i had this error instead The DELETE method is not supported for this route. Supported methods: POST.

Your form should be in the following way
<form action="{{ url('sub_category/delete',$item->id) }}" method="POST">
<input name="_method" type="hidden" value="DELETE">
@csrf
<button type="submit" class="btn btn-outline-danger">remove category</button>
</form>


why should i put  input in the form

Since there is not a DELETE method on forms, it must be masked through an input field. The same occurs with PUT.

i had this error now The DELETE method is not supported for this route. Supported methods: POST.

can you try lowercasing your method in route definition? Route::deleteand then call php artisan route:list to check if your delete route is defined?
