my function for removing the cart from a panel:
function removeFromCart(key) {
$.post('{{ route('cart.remove') }}', {_token: '{{ csrf_token() }}', key: key}, function (response) {
console.log(response)
updateNavCart();
$('#cart-summary').empty().html(response.data);
toastr.warning('{{\App\CPU\translate('Item has been removed from cart')}}', {
CloseButton: true,
ProgressBar: true
});
});
}
CodePudding user response:
You Can Use This To Reload Your Page From Ajax.
location.reload();