laravel db query builder 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();