Level 73
Transaction::whereRaw('plan_price - final_price >= 5');
Should work.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
i want to build an eloquent query sum of two column greater than a number like this
$query = Transaction::query();
$query = $query->where('plan_price - final_price','>=',5);
how ?
Transaction::whereRaw('plan_price - final_price >= 5');
Should work.
Please or to participate in this conversation.