public function pluck($value, $key = null) { $this->newQuery(); $lists = $this->query->pluck($value, $key); if (is_array($lists)) { return $lists; } return $lists->all(); }
/** * @param string $value * @param string $key * @return array */ public function pluck($value, $key = null) { $this->applyCriteria(); $lists = $this->model->pluck($value, $key); if (is_array($lists)) { return $lists; } return $lists->all(); }
/** * Get a single column's value from the first result of a query. * * This is an alias for the "value" method. * * @param string $column * @return mixed * @deprecated since version 5.1. * @static */ public static function pluck($column) { return \Illuminate\Database\Eloquent\Builder::pluck($column); }
/** * @param string|int $value * @param string $key * * @return \Illuminate\Database\Eloquent\Collection */ public function getList($value, $key = 'id') { return $this->model->pluck($value, $key); }