Php 不使用laravel paginate的唯一方法

Php 不使用laravel paginate的唯一方法,php,laravel,model,Php,Laravel,Model,我在我的项目中使用了Laravel7,我试图通过分页显示数据库中的唯一项,但我注意到分页不适用于unque方法。请问我怎样才能绕过这个?下面是我的代码: $bid = Bid::latestFirst()->get(); $bids = $bid->unique('item_id'); $bids->values()->paginate(10); //This is where I get the error: BadMet

我在我的项目中使用了Laravel7,我试图通过分页显示数据库中的唯一项,但我注意到分页不适用于unque方法。请问我怎样才能绕过这个?下面是我的代码:

        $bid = Bid::latestFirst()->get();
        $bids = $bid->unique('item_id');
        $bids->values()->paginate(10); //This is where I get the error: BadMethodCallException
                                       //Method Illuminate\Database\Eloquent\Collection::paginate does not exist.
您可以像这样使用
distinct()

Bid::distinct('item_id')->latestFirst()->paginate(10);

尝试了不同的,但仍然没有显示唯一的项目。