Skip to content

Commit 221508e

Browse files
committed
Add default attribute to create method
This brings it inline with the base Eloquent `create` method, and allows us to call this method without providing any attributes.
1 parent 3f86eb8 commit 221508e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Jenssegers/Mongodb/Relations/EmbedsOneOrMany.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function saveMany($models)
143143
* @param array $attributes
144144
* @return Model
145145
*/
146-
public function create(array $attributes)
146+
public function create(array $attributes = [])
147147
{
148148
// Here we will set the raw attributes to avoid hitting the "fill" method so
149149
// that we do not have to worry about a mass accessor rules blocking sets

0 commit comments

Comments
 (0)