groupBy('winning_bidder_num') ->orderBy('bidders.bidder_assigned_number') ->get(); $winning_bidder_num = 'choose...'; foreach ($winning_bidder_num_results as $winning_bidder_num_result) { $winning_bidder_num .= '' . $winning_bidder_num_result->bidder_assigned_number . ' - ' . $winning_bidder_num_result->bidder_fname . ' ' . $winning_bidder_num_result->bidder_lname . ''; } return $winning_bidder_num; } }