Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setTimeout(function() {
- $("#get_data").trigger('click');
- },10);
- $("#get_data").click(function(){
- var url = "{{route('get-some-data')}}"
- // $('#getData').DataTable().clear().destroy();
- $.ajax({
- type: "get",
- url: url,
- dataType: "json",
- success:function(data){
- Swal.fire({
- type: 'success',
- title: 'Has been Updated',
- text: data.message.id,
- }).then(function() {
- var VendorClient = $("#tAccount").DataTable({
- lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
- processing: true,
- serverSide: false,
- ajax: "{{route('some-url-response')}}",
- columns: [
- {
- data: "fullname",
- name: "fullname",
- orderable:false
- },
- {
- data: "name",
- name: "name",
- orderable:false
- },
- {
- data: "month",
- name: "month",
- orderable:false
- }
- ]
- });
- });
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment