Select all Filters from Products which belongs to one Category in Laravel
<p>I have these tables:</p>

<ul>
<li>Category</li>
<li>Line</li>
<li>Product</li>
<li>Filter</li>
<li>Product_filter</li>
</ul>

<p>Category -> Line -> Product -> Filter</p>

<p>One product has many filters</p>

<p>One product has one category and one line</p>

<p>I need to get all the filters for one category.
Today, through relationships between the tables, I can get all the products from on category and all the filters from one product:</p>

<pre><code>// All the products
$category-&gt;products

// All the filters
$product-&gt;filters

//or
$category-&gt;products-&gt;first()-&gt;filters
</code></pre>

<p>Now, I need to get the filters by category, something like:</p>

<pre><code>$category-&gt;filters
// or
$category-&gt;products-&gt;filters
</code></pre>

<p>A small brief:</p>

<ul>
<li>A category has products who have filters</li>
</ul>

<p>How to get all the filters by Category?</p>