public function index() {
$users = User::paginate(5);
return view('test', compact('users'))-> ... ;
}
Each paginator instance provides additional pagination information via the following methods:
...$results->total()
(Not available when using simplePaginate)