original_string: public function unique($key = null, $strict = false)
      {
          if (! is_null($key)) {
              return parent::unique($key, $strict);
          }
  
          return new static(array_values($this->getDictionary()));
      }
code: public function unique($key = null, $strict = false)
      {
          if (! is_null($key)) {
              return parent::unique($key, $strict);
          }
  
          return new static(array_values($this->getDictionary()));
      }
code_tokens: public function unique ( $ key = null , $ strict = false ) { if ( ! is_null ( $ key ) ) { return parent :: unique ( $ key , $ strict ) ; } return new static ( array_values ( $ this -> getDictionary ( ) ) ) ; }
docstring: Return only unique items from the collection.
  
  @param  string|callable|null  $key
  @param  bool  $strict
  @return static|\Illuminate\Support\Collection
docstring_tokens: Return only unique items from the collection .