Is there an equivalent query for this in eloquent?
SELECT DISTINCT agent_code,ord_amount FROM orders
Advertisement
Answer
Try something like this:
Order::select('agent_code', 'ord_amount')->distinct()->get();
Is there an equivalent query for this in eloquent?
SELECT DISTINCT agent_code,ord_amount FROM orders
Try something like this:
Order::select('agent_code', 'ord_amount')->distinct()->get();