pluck查询字段数
pluck可以同时指定两个字段,以array('key'=>'value')的形式返回,第二个参数为key,第一个为value。貌似不支持三个字段?
pluck可以同时指定两个字段,以array('key'=>'value')的形式返回,第二个参数为key,第一个为value。貌似不支持三个字段?
2016-12-21
只能接受两个参数
public function pluck($column, $key = null) { $results = $this->get(is_null($key) ? [$column] : [$column, $key]); // If the columns are qualified with a table or have an alias, we cannot use // those directly in the "pluck" operations since the results from the DB // are only keyed by the column itself. We'll strip the table out here. return Arr::pluck( $results, $this->stripTableForPluck($column), $this->stripTableForPluck($key) ); }
举报