this is the code of my ProductController.php
function removeCart($id)
{
Cart::destroy($id);
return redirect('cartlist');
}
this is my route in web.php
Route::get("removecart/{id}",[ProductController::class,'removeCart'])->name('remove');
this is my balde file code
<a href="{{url('/removecart/{$item->cart_id}')}}" class="btn btn-warning" >Remove from Cart</a>
my remove from cart button is not working
My Answer:
'/removecart/{id}', 'ProductController@removeCart');
Rate this post
5 of 5 based on 3464 votesComments