0

When I am using laravel Collection & DB query pagination. getting the following error.

new UserCollection(DB::table('users')->paginate());

e

I am using elequent pagination as follows,

new UserCollection(User::paginate());

It works fine as follows.

en

I have upgraded from Laravel 5.8 to 6.

Vikrant
  • 4,920
  • 17
  • 48
  • 72
shihabudheen
  • 696
  • 8
  • 26

1 Answers1

0

Try is one

 User::paginate();
You need to convert stdClass to array