src/Database/Builder.php
public function pluckDates($column, $keyFormat = '%Y-%m', $valueFormat = '%F %Y')
    {
        $dates = [];

        $collection = $this->selectRaw("{$column}, MONTH({$column}) as month, YEAR({$column}) as year")
                           ->groupBy([$column, 'month', 'year'])->get();

        if ($collection) {
            foreach ($collection as $date) {
                $key = mdate($keyFormat, strtotime($date[$column]));
                $value = mdate($valueFormat, strtotime($date[$column]));
                $dates[$key] = $value;
            }
        }

        return $dates;
    }
public function pluckDates($column, $keyFormat = '%Y-%m', $valueFormat = '%F %Y')
    {
        $dates = [];

        $collection = $this->selectRaw("{$column}, MONTH({$column}) as month, YEAR({$column}) as year")
                           ->groupBy([$column, 'month', 'year'])->get();

        if ($collection) {
            foreach ($collection as $date) {
                $key = mdate($keyFormat, strtotime($date[$column]));
                $value = mdate($valueFormat, strtotime($date[$column]));
                $dates[$key] = $value;
            }
        }

        return $dates;
    }
Get an array with the values of dates.

@param  string $column
@param string $keyFormat
@param string $valueFormat

@return array