public function LengthAwarePaginator($items, $resultsPerPage = 4)
    {
        //Get current page form url e.g. &page=6
        $currentPage = LengthAwarePaginator::resolveCurrentPage();

        //Create a new Laravel collection from data
        $collection = new Collection($items);

        //Slice the collection to get the items to display in current page
        $currentPageSearchResults = $collection->slice(($currentPage - 1) * $resultsPerPage, $resultsPerPage) -> all();

        //Create our paginator and pass it to the view
        return new LengthAwarePaginator($currentPageSearchResults, count($collection), $resultsPerPage);
    }