这个时候出现问题
public function index($category_id =0)
{
$articles = Article::with('getCategory')->where('category_id',$category_id)->paginate(1);
return $this->collection($articles, new ArticleTransformer(), function ($resource, $fractal) {
$fractal->setSerializer(new ArticleSerializer());
});
}
Argument 1 passed to Dingo\\Api\\Http\\Response\\Factory::collection() must be an instance of Illuminate\\Support\\Collection, instance of Illuminate\\Pagination\\LengthAwarePaginator given