I have this simple sql query
$orders=DB::table('carts')
-
->join('prod_suppliers','carts.prod_supplier_id','=','prod_suppliers.id')
->join('tickets','carts.ticket_id','=','tickets.id')
->distinct()
->select(
'suppliers.id as supplier_id',
'suppliers.supplier',
'suppliers.house_no_street_no',
'barangays.brgy_name',
'suppliers.city_id',
'tickets.id',
'tickets.ticket_no',
)
->get();
dd($orders);
i want my result to be an object but im getting result as an array
Collection {#525 ▼
#items: array:2 [▶]
}
what is the best way i can do to solve this problem?