title: Laravel 4 - Get Array of Attributes from Collection
body: <p>I have a collection of objects. Let's say the objects are tags:</p>
  
  <pre><code>$tags = Tag::all();
  </code></pre>
  
  <p>I want to retrieve a certain attribute for each tag, say its name. Of course I can do</p>
  
  <pre><code>foreach ($tags as $tag) {
      $tag_names[] = $tag-&gt;name;
  }
  </code></pre>
  
  <p>But is there a more laravelish solution to this problem?</p>
  
  <p>Something like <code>$tags-&gt;name</code>?</p>