Laravel 5.7 删除未到达控制器删除方法(returns 404 错误页面)

Laravel 5.7 delete does not reach controller delete method (returns 404 error page)

所以我有这个删除表单

<form action="/remove-cart/{{ $item->rowId}}" method="POST">
   @method('DELETE')
   @csrf
   <input type="submit" value="Remove item">
 </form>

去这条路线

 Route::delete('/remove-cart/{$id}', 'CartController@removeCart');

应该转到方法

public function removeCart($id){

  return $id;

}

但未达到该方法,我收到 404 页面未找到并显示 url http://project.dev/remove-cart/123(123是$item->rowId的值)

我做错了什么?

请尝试 Route::delete('/remove-cart/{id}', 'CartController@removeCart'); 而不是 {$id}