laravel db query buider get all values from one col code example
Example: laravel get single column value
$items = DB::table('items')
->select('id', 'ref_code', 'name', 'price')
->where('ref_code','=', $request->ref_code)
->first();