How filter on calculated field (append) in Eloquent Laravel?
<p>I have calculated property 'price' in model Room.</p>

<pre><code>protected $appends = ['price'];

public function getPriceAttribute()
{
    if ($this-&gt;action) return $this-&gt;action_price_per_meter*$this-&gt;area;
    return $this-&gt;price_per_meter*$this-&gt;area;
}
</code></pre>

<p>When i filter Rooms by this virtual field ... </p>

<pre><code>$rooms = Room::where('price','&lt;',100000)-&gt;get();
</code></pre>

<p>of course i got error  - Column 'price' not found</p>

<p>How to solve this problem in Laravel way?</p>