public function set($data): CursorPaginator
    {
        $this->items = $data instanceof Collection ? $data : collect($data);

        return $this;
    }
public function set($data): CursorPaginator
    {
        $this->items = $data instanceof Collection ? $data : collect($data);

        return $this;
    }
public function set ( $ data ) : CursorPaginator { $ this -> items = $ data instanceof Collection ? $ data : collect ( $ data ) ; return $ this ; }
Set the paginator's underlying collection.

@param  \Illuminate\Support\Collection|array|null $data
@return self
Set the paginator s underlying collection .