public function pluck($key, $unique = false)
    {
        $results = [];
        foreach ($this as $item) {
            $value = is_object($item) ? $item->$key : $item[$key];
            if ($unique) {
                $results[$value] = $value;
            } else {
                $results[] = $value;
            }
        }
        $collection = new static($results);
        return $collection->resetKeys();
    }