From ca095ffcc6f30ae7e8ab3a628b6840611751f799 Mon Sep 17 00:00:00 2001 From: Arthur Vandenberghe Date: Fri, 5 Apr 2019 00:04:09 +0200 Subject: [PATCH] Bugfix add collection with options Adding a fix for #1734 . I might come up with a pull request for json schema's: https://docs.mongodb.com/manual/reference/operator/query/jsonSchema/#op._S_jsonSchema @jenssegers would you like to have this feature? --- src/Jenssegers/Mongodb/Schema/Blueprint.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Jenssegers/Mongodb/Schema/Blueprint.php b/src/Jenssegers/Mongodb/Schema/Blueprint.php index 0c01c96aa..a6ae1bc53 100644 --- a/src/Jenssegers/Mongodb/Schema/Blueprint.php +++ b/src/Jenssegers/Mongodb/Schema/Blueprint.php @@ -188,14 +188,14 @@ public function expire($columns, $seconds) /** * @inheritdoc */ - public function create() + public function create($options = []) { $collection = $this->collection->getCollectionName(); $db = $this->connection->getMongoDB(); // Ensure the collection is created. - $db->createCollection($collection); + $db->createCollection($collection, $options); } /**