Requirement
In my controller i am returning Json response to ajax function and from ajax function i have to display this data with pagination
I get the results in ajax success function but dont know how to paginate and display inside a div in the view
So Far I have tried Following Code
Controller
$mpullethouse = DB::table('mpullethouses')->get();
return response()->json(['mpullethouses'=>$mpullethouse]);
Jquery
$.ajax({
url : 'seachpullethouse',
method : 'get',
dataType : 'Json',
data : formdata,
success : function(data){
//here i have to paginate and display the results which i dont know
},
error : function(){
alert('error');
}
});
can any one please help me?...