Reputation: 83
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
Upvotes: 1
Views: 480