//Get current page form url e.g. &page=6 $currentPage = LengthAwarePaginator::resolveCurrentPage();
//Create a new Laravel collection from the array data $collection = new Collection($searchResults);
//Define how many items we want to be visible in each page $perPage = 5;
//Slice the collection to get the items to display in current page $currentPageSearchResults = $collection->slice($currentPage * $perPage, $perPage)->all();
//Create our paginator and pass it to the view $paginatedSearchResults= new LengthAwarePaginator($currentPageSearchResults, count($collection), $perPage);