original_string: protected function pluckFromArrayColumn($queryResult, $column, $key)
      {
          $results = [];
  
          if (is_null($key)) {
              foreach ($queryResult as $row) {
                  $results[] = $row[$column];
              }
          } else {
              foreach ($queryResult as $row) {
                  $results[$row[$key]] = $row[$column];
              }
          }
  
          return collect($results);
      }
code: protected function pluckFromArrayColumn($queryResult, $column, $key)
      {
          $results = [];
  
          if (is_null($key)) {
              foreach ($queryResult as $row) {
                  $results[] = $row[$column];
              }
          } else {
              foreach ($queryResult as $row) {
                  $results[$row[$key]] = $row[$column];
              }
          }
  
          return collect($results);
      }
code_tokens: protected function pluckFromArrayColumn ( $ queryResult , $ column , $ key ) { $ results = [ ] ; if ( is_null ( $ key ) ) { foreach ( $ queryResult as $ row ) { $ results [ ] = $ row [ $ column ] ; } } else { foreach ( $ queryResult as $ row ) { $ results [ $ row [ $ key ] ] = $ row [ $ column ] ; } } return collect ( $ results ) ; }
docstring: Retrieve column values from rows represented as arrays.
  
  @param  array  $queryResult
  @param  string $column
  @param  string $key
  @return \Illuminate\Support\Collection
docstring_tokens: Retrieve column values from rows represented as arrays .