Q: Call to a member function paginate() on array in Laravel Here is my code in laravel,
use Illuminate\Pagination\LengthAwarePaginator;

$result = DB::connection('mysql')->select("select * from login_master")->paginate(5);

Its showing Call to a member function paginate() on array. How to user paginate() in this code.

A: Try this:
DB::connection('mysql')->table("login_master")->paginate(5);

If using Eloquent:
LoginMaster::paginate(5);

