title: How to get certains values from Eloquent collection?
body: <p>I have an Eloquent collection (already executed query) and I need to do some things with two items from this array so I need to use <code>only</code> or <code>pluck</code> methods but they dont  return what I need... </p>
  
  <pre><code>$orders = Order::with('parts')-&gt;paginate(50);
  
  $orders[0]-&gt;parts-&gt;lists('name'); // Returns names
  $orders[0]-&gt;parts-&gt;lists('custom_name'); // Returns custom names
  
  $orders[0]-&gt;parts-&gt;only(['name', 'custom_name']); // Returns nothing
  $orders[0]-&gt;parts-&gt;pluck(['name', 'custom_name']); // Returns no values
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/VO5PC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VO5PC.png" alt="enter image description here"></a></p>