title: Get key from collection item
body: <p>How do I get the key from a collection item?</p>
  
  <p><code>$posts= Post::all();</code></p>
  
  <p>Example (doesn't work):</p>
  
  <p><code>$key = $posts-&gt;where('id', $id)-&gt;getKey();</code></p>