I want to delete records from database through my website. I have specified my methods as DELETE but it doesn't seem to be working.
In my form method, I have specified it as DELETE
<form method = "DELETE" action = "/admin_delete_bitstamp/{{ $data->bitstamp_api_id }}">
<button type = "submit" name = "delete" class = "btn">Delete</button>
</form>
In my routes file, I have also specified it as DELETE
Route::delete("/admin_delete_bitstamp/{id}", "Bitstamp_Access_C@destroy");
This is my delete function
public function destroy($id) {
$api = Bitstamp_Access_M::find($id);
$api->delete();
return redirect()->back();
}
The error message that I am getting is "The GET method is not supported for this route. Supported methods: DELETE."
I apologize if this is a rookie mistake.