original_string: public function participantsString($userId=null, $columns=['first_name'])
      {
          $selectString = $this->createSelectString($columns);
  
          $participantNames = $this->getConnection()->table($this->getUsersTable())
              ->join('participants', $this->getUsersTable() . '.id', '=', 'participants.user_id')
              ->where('participants.thread_id', $this->id)
              ->select($this->getConnection()->raw($selectString));
  
          if ($userId !== null) {
              $participantNames->where($this->getUsersTable() . '.id', '!=', $userId);
          }
  
          $userNames = $participantNames->lists($this->getUsersTable() . '.name');
  
          return implode(', ', $userNames);
      }
code: public function participantsString($userId=null, $columns=['first_name'])
      {
          $selectString = $this->createSelectString($columns);
  
          $participantNames = $this->getConnection()->table($this->getUsersTable())
              ->join('participants', $this->getUsersTable() . '.id', '=', 'participants.user_id')
              ->where('participants.thread_id', $this->id)
              ->select($this->getConnection()->raw($selectString));
  
          if ($userId !== null) {
              $participantNames->where($this->getUsersTable() . '.id', '!=', $userId);
          }
  
          $userNames = $participantNames->lists($this->getUsersTable() . '.name');
  
          return implode(', ', $userNames);
      }
code_tokens: public function participantsString ( $ userId = null , $ columns = [ 'first_name' ] ) { $ selectString = $ this -> createSelectString ( $ columns ) ; $ participantNames = $ this -> getConnection ( ) -> table ( $ this -> getUsersTable ( ) ) -> join ( 'participants' , $ this -> getUsersTable ( ) . '.id' , '=' , 'participants.user_id' ) -> where ( 'participants.thread_id' , $ this -> id ) -> select ( $ this -> getConnection ( ) -> raw ( $ selectString ) ) ; if ( $ userId !== null ) { $ participantNames -> where ( $ this -> getUsersTable ( ) . '.id' , '!=' , $ userId ) ; } $ userNames = $ participantNames -> lists ( $ this -> getUsersTable ( ) . '.name' ) ; return implode ( ', ' , $ userNames ) ; }
docstring: Generates a string of participant information
  
  @param null $userId
  @param array $columns
  @return string
docstring_tokens: Generates a string of participant information