code: protected function transaction(Closure $closure)
      {
          if (!$this->useTransactions) {
              return $closure();
          }
  
          return app('db')->connection($this->connection)->transaction($closure);
      }
docs: Execute the closure within an optional transaction.
  
  @param Closure $closure
  @return mixed