code: public function implode($value, $glue = null)
      {
          $new_collection = new Collection($this->toArray());
          $first = $new_collection->first();
  
          if (is_array($first) || is_object($first)) {
              return implode($glue, $new_collection->pluck($value)->all());
          }
  
          return implode($value, $new_collection->all());
      }
docs: Concatenate values of a given key as a string.
  
  @param  string  $value
  @param  string  $glue
  @return string