は、これは私が常に保つ理由を私は知らない私のルートラベル5削除方法。常にRouteCollection.phpライン233でMethodNotAllowedHttpException:
Route::delete('/customer_page/summary/{id}', '[email protected]_cart');
私のコントローラ機能
public function delete_cart($id)
{
cart::findOrFail($id)->delete();
return redirect('/customer_page/summary');
}
マイフォーム
@foreach($cart as $key => $val)
<tr>
<td>{{ $val->room_type }}</td>
<td>{{ $val->number_of_rooms }}</td>
<td>{{ $val->price }}</td>
<td>
<form action="/customer_page/summary/{{ $val->id }}" method="post">
{{ csrf_field() }}
<input type="hidden" name="_method" value="DELETE" />
<button type="submit" class="btn waves-effect red"><i class="material-icons">delete</i>delete</button>
</form>
</td>
</tr>
@endforeach
ですそのエラーが発生する
あなたの 'アクション'から開始 '/'を削除する –