title: Eloquent: find() and where() usage laravel
body: <p>I am trying to get a record from a <code>posts</code> database table using its id. I've been banging my head on the find() method for quite sometime now, confused as to why it wasn't working. Here is my query that looks correct to me but didn't work:</p>
  
  <pre><code>$post = Post::find($id);
  $post-&gt;delete();
  </code></pre>
  
  <p>Reluctantly i did this:</p>
  
  <pre><code>$post = Post::where('id', $id);
  $post-&gt;delete();
  </code></pre>
  
  <p>and surprisingly enough, it worked but I have no idea how. </p>
  
  <p>I also know that unlike <code>find()</code>,  <code>where()</code> is a query builder and so I could also use it like this:
  <code>Post::where('id', $id)-&gt;first()</code></p>
  
  <p>Any ideas about the difference in the way the methods work?</p>