You can also perform raw expressions on the internal MongoCollection object, note that this will return the original response, and not a collection of models.
You can also perform raw expressions on the internal MongoCollection object. If this is executed on the model class, it will return a collection of models. If this is executed on the query builder, it will return the original response.
User::raw(function($collection)
// Returns a collection of User models.
$models = User::raw(function($collection)
{
return $collection->find();
});
Or you can access the internal MongoCollection object directly: