title: Laravel eloquent many to many with conditions
body: <p>I have <code>many to many</code> relationships. Let's say I am using <code>foo</code> and <code>bar</code></p>
  
  <pre><code>class Foo extends Model
  {
      public function bars() 
      {
         return $this-&gt;belongsToMany(Bar::class);
      }
  }
  
  class Bar extends Model
  {
      public function foos() 
      {
         return $this-&gt;belongsToMany(Foo::class);
      }
  }
  </code></pre>
  
  <p>how to show only <code>Foo</code> that have <code>Bar</code> so <code>Foo</code> record that not associated with <code>Bar</code> will not be displayed?...</p>