1

I'm looking to make a query that gets all the existing indexes of a collection.

I have tried the following code:

DB::connection('mongodb')->getMongoDB()->execute("db.registrations.getIndexes()")

But getting error

Call to undefined method MongoDB\Database::execute()

How do I execute raw queries on this library?

Thanks

Soul
  • 83
  • 7

0 Answers0