title: Laravel - pluck mutated attribute
body: <p>I have run into an issue, and it is really only a minor inconvenience, but...</p>
  
  <p>Basically what I need is an associative array for a select box. Normally, this would be achieved using the <code>pluck()</code> function.</p>
  
  <p>The problem is, the attribute that I want to use as the 'text' does not actually exist in the database, it is a mutator that combines two fields into one.</p>
  
  <pre><code>public function getNameAttribute() {
      return $this-&gt;first_name . ' ' . $this-&gt;last_name;
  }
  </code></pre>
  
  <p>I know that adding the <code>'name'</code> field to the <code>$appends</code> array on the model will include that field when casting the model to array, however this does not seem to work with <code>pluck()</code></p>
  
  <p>Is there a simple way to achieve want I want? Function or declaration I'm missing? Anything more eloquent than manually looping over the collection and creating my own associate array?</p>
  
  <p><strong>Update</strong></p>
  
  <p>I'm an idiot. I was passing an array to pluck instead of two parameters. Apparently pluck does utilize the <code>$appends</code> attribute. Note, this only works when working with collections:</p>
  
  <pre><code>$collection-&gt;pluck('mutatedValue', 'key');
  </code></pre>
  
  <p><strong>NOT</strong> the query builder </p>
  
  <pre><code>$queryBuilder-&gt;pluck('mutatedValue', 'id');
  </code></pre>