Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(document).ready(function(){
- $.ajaxSetup({
- headers: {
- 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
- }
- });
- $('.add_cart').click(function(){
- var id_produk = $(this).data("produkid");
- $.ajax({
- url : "{{ route('add_to_cart') }}",
- method : "POST",
- data : {id_produk: id_produk},
- success : function(data){
- $('#tbKeranjang').html(data);
- }
- });
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement