title: Laravel get the posts which is not liked by the user
body: <p>I have 3 tables in mysql. &quot;users&quot;, &quot;posts&quot; and &quot;likes&quot;. The &quot;likes&quot; table has user_id and post_id. I can get the posts which is liked by a certain user by this code in Laravel:</p>
  <pre><code>$posts = Post::join('likes', function($join) use($userId) {
      $join-&gt;on('likes.user_id', '=', $userId);
      $join-&gt;on('likes.post_id', '=', 'posts.id'));
  });
  $posts-&gt;select('posts.*');
  </code></pre>
  <p>But I want a query to get all of the posts which is not liked by that user.</p>