如何在 laravel 中的 db select 之后获取数组而不是对象

How get array instead of object after db select in laravel

我有这个问题

DB::table('my_table')->whereIn('column_id', $tagList)->get(array('product_id'));

但结果我得到了 stdClass 对象数组

array (size=2)
  0 => 
    object(stdClass)[964]
      public 'product_id' => int 19
  1 => 
    object(stdClass)[961]
      public 'product_id' => int 20

是否有可能将值作为简单数组获取?

array (size=2)
  0 => 19
  1 => 20

使用lists

DB::table('my_table')->whereIn('column_id', $tagList)->lists('child_id');