laravel-apidoc-generator call to a member function prepare() on null laravel mongodb db transaction laravel 5.7

Posted 5 months ago by pro_raheel

I am using jenssegers/laravel-mongodb with laravel 5.7 and want to generate API documentation using laravel-api-doc package https://github.com/mpociot/laravel-apidoc-generator but found the error Transaction database.


Symfony\Component\Debug\Exception\FatalThrowableError  : Call to a member function beginTransaction() on nul
 protected function createTransaction()
    106|     {
    107|         if ($this->transactions == 0) {
    108|             try {
  > 109|                 $this->getPdo()->beginTransaction();
    110|             } catch (Exception $e) {
    111|                 $this->handleBeginTransactionException($e);
    112|             }
    113|         } elseif ($this->transactions >= 1 && $this->queryGrammar->supportsSavepoints()) {

  Exception trace:

  1   Illuminate\Database\Connection::createTransaction()

please help m.

Thanks

Please sign in or create an account to participate in this conversation.