【发布时间】:2017-05-23 13:53:14
【问题描述】:
要求
在我的控制器中,我将 Json 响应返回给 ajax 函数,并且从 ajax 函数我必须通过分页显示这些数据
我在 ajax 成功函数中得到结果,但不知道如何在视图中的 div 内进行分页和显示
到目前为止,我已经尝试过遵循代码
控制器
$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');
}
});
谁能帮帮我?...
【问题讨论】:
标签: laravel-5