How to execute raw query in jenssegers/laravel-mongodb

452 Views Asked by At

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

0

There are 0 best solutions below