protected function executeInTransaction(string $method) : void
    {
        try {
            $this->database->beginTransaction();

            $this->{$method}();

            $this->database->commit();
        } catch (Exception $exception) {
            $this->database->rollBack();

            $this->handleException($exception);
        }
    }
protected function executeInTransaction(string $method) : void
    {
        try {
            $this->database->beginTransaction();

            $this->{$method}();

            $this->database->commit();
        } catch (Exception $exception) {
            $this->database->rollBack();

            $this->handleException($exception);
        }
    }
protected function executeInTransaction ( string $ method ) : void { try { $ this -> database -> beginTransaction ( ) ; $ this -> { $ method } ( ) ; $ this -> database -> commit ( ) ; } catch ( Exception $ exception ) { $ this -> database -> rollBack ( ) ; $ this -> handleException ( $ exception ) ; } }
Execute the migration command inside a transaction layer.

@param string $method

@return void
Execute the migration command inside a transaction layer .