УРА!
You can add this method as Collection method in AppServiceProvider. just add this in boot method.
if (!Collection::hasMacro('paginate')) {
Collection::macro('paginate',
function ($perPage = 10, $page = null, $options = []) {
$page = $page ?: (Paginator::resolveCurrentPage() ?: 1);
return (new LengthAwarePaginator(
$this->forPage($page, $perPage), $this->count(), $perPage, $page, $options))
->withPath('');
});
}
Вот так сделать и будет работать пагинация для коллекций!