Laravel Eloquent double relation with condition
<p>I have three models with following data:</p>

<ol>
<li><p>Product</p>

<ul>
<li>id</li>
<li>name</li>
<li>description</li>
</ul></li>
<li><p>Variant</p>

<ul>
<li>id</li>
<li>colour</li>
<li>type</li>
<li>private</li>
<li>product_id</li>
</ul></li>
<li><p>Image</p>

<ul>
<li>url</li>
<li>variant_id</li>
</ul></li>
</ol>

<p>So the relations are: </p>

<ul>
<li>Product hasMany Variants</li>
<li>Variant hasMany Images</li>
</ul>

<p>I need to get a collection of all the Variants, including the parent Product because I also need its name and including the images related to the Variant, with the conditions (on Variant) ->where('type', 'OPT') and ->where('private', false). </p>

<p>I tried to do it with a raw SQL query but I need to loop through Variant's images in the blade template, so I need a collection. How can I put all together without running too many queries? </p>