与模型转换#laravel的Paginatated响应

时间:2016-01-19 09:54:31

标签: laravel

情形:

//UserController.php
function index(Request $request){
    return User::with('someRelation')->paginate($request->limit);
}

function transformCollection(Collection $users){
    //some logic
}

问题“如何转换分页结果?”;

0 个答案:

没有答案