$(document).ready(function(){

  $(document).on('click', '.trashbtnRestore', function () {
    
    var gettingid=$(this).data('id');
    restorecompany(gettingid);

  });

});

 
function restorecompany(gettingid)
{
  $.ajaxSetup({

    headers: {

        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')

    } 

  });


  $.ajax({ 
  
    url:url_restorecompany,

    method:"POST",

    data:{gettingid:gettingid},

    success:function(result)

    {
      $("#company_trashed").modal('hide');

        var success="";

        success=success+
      
        '<p style="text-align:center;"><b>Comapny Restore Successfully !!!</b></p>';
      
        $('#company_success').append(success);
        $('#company_success').removeClass("hide");
      
        setTimeout(function(){
         location.reload();
        }, 200);
    }

 });

}