请问一下dingo里边的collection集合,如果数据很多,怎么分页,或是只取集合十条数据,怎么写?
目前是是这样子获得评论集合的,如果评论很多,想分页或是只获取10条数据
//评论
public function includeComment(Content $content)
{
return $this->collection($content->comment,new CommentTransformer());
}
```//分页
collection $content->comment 怎么分页,或是只取集合十条数据,怎么写?谢谢大家~
推荐文章: