Skip to content

Commit 6638967

Browse files
committed
Bugfix add collection with options
Adding a fix for mongodb#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?
1 parent 3f0609c commit 6638967

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Jenssegers/Mongodb/Schema/Blueprint.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ public function expire($columns, $seconds)
188188
/**
189189
* @inheritdoc
190190
*/
191-
public function create()
191+
public function create($options = [])
192192
{
193193
$collection = $this->collection->getCollectionName();
194194

195195
$db = $this->connection->getMongoDB();
196196

197197
// Ensure the collection is created.
198-
$db->createCollection($collection);
198+
$db->createCollection($collection, $options);
199199
}
200200

201201
/**

0 commit comments

Comments
 (0)