Damn, I have another option for this.
You can use FIND_IN_SET ('ABC', 'ABC, CDE, DEF, XYZ');
It will return true if the condition is true, so you can add this condition to the connection reason.
OrderItem::join('order', function($join){ $join->on('order.id','=','order_item.order_id') $join->on(\DB::raw("FIND_IN_SET(order.order_status,'payment_completed,refund_requested')"),"=",\DB::raw('"1"')); })->where('order_item.item_id','=','1')->get();
source share