I have a query that when passing to eloquent returns me a syntax error.
SELECT order_id FROM timelines
WHERE order_id NOT IN (SELECT order_id FROM timelines WHERE supplier_approved_id) AND supplier_id = 2
GROUP BY order_id
Eloquent:
Timeline::select('order_id')
->whereRaw('order_id NOT IN', [], '( SELECT order_id FROM timelines WHERE supplier_approved_id )')
->where('supplier_id', 2)
->groupBy('order_id')
->get();