public function mapIds($results)
    {
        $keyName = $this->model ? $this->model->getKeyName() : 'id';

        return collect($results)
            ->pluck($keyName)
            ->values();
    }
public function mapIds($results)
    {
        $keyName = $this->model ? $this->model->getKeyName() : 'id';

        return collect($results)
            ->pluck($keyName)
            ->values();
    }
public function mapIds ( $ results ) { $ keyName = $ this -> model ? $ this -> model -> getKeyName ( ) : 'id' ; return collect ( $ results ) -> pluck ( $ keyName ) -> values ( ) ; }
Pluck and return the primary keys of the given results.

@param mixed $results
@return \Illuminate\Support\Collection
Pluck and return the primary keys of the given results .