Skip to content

Error Call to undefined method MongoDB\Database::connect(). #2649

@batmahir

Description

@batmahir
  • Laravel-mongodb Version: 4.0
  • PHP Version: 8.2
  • Database Driver & Version: mongo 5

Description:

Steps to reproduce

  1. Run php artisan tinker with php8.2
  2. run command : DB::connect();
  3. Error will pop up

Expected behaviour

It should be showing like connection success or failure instead of undefined method

Actual behaviour

php artisan tinker
Psy Shell v0.11.21 (PHP 8.2.10 — cli) by Justin Hileman

DB::connect();

Error Call to undefined method MongoDB\Database::connect().

Logs: Insert log.txt here (if necessary)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions