title: show relation table based on the parent table column in laravel
body: <p>I want to show the <code>ProductAttributes</code> relation based on the product's <code>attribute_status</code> column.</p>
  <p>Here is my code:</p>
  <pre class="lang-php prettyprint-override"><code>Product::with('productImages', 'productReviews', 'user.vendors', 'subchildcategories', 'ProductAttributes')
      -&gt;where('category_id', $request-&gt;category_id)
      -&gt;where('products.status', 1)
      -&gt;get();
  </code></pre>