protected function store($results)
    {
        $results->each(function ($model) {
            if (! isset($this->connection)) {
                $model->setConnection($model->newQueryWithoutScopes()->getConnection()->getName());
            }

            $model->save();
        });
    }
protected function store($results)
    {
        $results->each(function ($model) {
            if (! isset($this->connection)) {
                $model->setConnection($model->newQueryWithoutScopes()->getConnection()->getName());
            }

            $model->save();
        });
    }
protected function store ( $ results ) { $ results -> each ( function ( $ model ) { if ( ! isset ( $ this -> connection ) ) { $ model -> setConnection ( $ model -> newQueryWithoutScopes ( ) -> getConnection ( ) -> getName ( ) ) ; } $ model -> save ( ) ; } ) ; }
Set the connection name on the results and store them.

@param  \Illuminate\Support\Collection  $results
@return void
Set the connection name on the results and store them .