Manually Creating A Paginator
Paginator class does not need to know the total number of items in the result set; however, because of this, the class does not have methods for retrieving the index of the last page. The
LengthAwarePaginator accepts almost the same arguments as the
Paginator; however, it does require a count of the total number of items in the result set.