use MazimezGigapayEmployee; $employees = Employee::list(); //getting list of employee $employees = $employees->paginate(1, 5); //add pagination return $employees->getJson();