public function getQueueableConnection()
    {
        if ($this->isEmpty()) {
            return;
        }

        $connection = $this->first()->getConnectionName();

        $this->each(function ($model) use ($connection) {
            if ($model->getConnectionName() !== $connection) {
                throw new LogicException('Queueing collections with multiple model connections is not supported.');
            }
        });

        return $connection;
    }
public function getQueueableConnection()
    {
        if ($this->isEmpty()) {
            return;
        }

        $connection = $this->first()->getConnectionName();

        $this->each(function ($model) use ($connection) {
            if ($model->getConnectionName() !== $connection) {
                throw new LogicException('Queueing collections with multiple model connections is not supported.');
            }
        });

        return $connection;
    }
public function getQueueableConnection ( ) { if ( $ this -> isEmpty ( ) ) { return ; } $ connection = $ this -> first ( ) -> getConnectionName ( ) ; $ this -> each ( function ( $ model ) use ( $ connection ) { if ( $ model -> getConnectionName ( ) !== $ connection ) { throw new LogicException ( 'Queueing collections with multiple model connections is not supported.' ) ; } } ) ; return $ connection ; }
Get the connection of the entities being queued.

@return string|null

@throws \LogicException
Get the connection of the entities being queued .