PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, April 18, 2022

[FIXED] How to load same page again in laravel using Ajax?

 April 18, 2022     ajax, jquery, laravel     No comments   

Issue

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
        });
    });
}

Solution

You Can Use This To Reload Your Page From Ajax.

location.reload();


Answered By - vivek vaghela
Answer Checked By - Gilberto Lyons (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing