Applies pagination to the collection
$files = $page->files()->paginate(10); $pagination = $files->pagination();
Check out the docs for the $pagination object