Introduction
The Laravel documentation is great most of the time, but when you are stuck on a particular problem you have to figure by yourself what is the solution. Recently I had to create manually a paginator instance using the LengthAwarePaginator class. The first attempt was nearly a success, here a snippet of my controller:
<?php
$page = $request->has('page') ? $request->get('page') : 1;
$data = $this->userRepository->paginate($request-> …




