File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
src/Illuminate/Database/Eloquent Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1083,6 +1083,16 @@ public function push()
1083
1083
return true ;
1084
1084
}
1085
1085
1086
+ /**
1087
+ * Save the model and all of its relationships without raising any events to the parent model.
1088
+ *
1089
+ * @return bool
1090
+ */
1091
+ public function pushQuietly ()
1092
+ {
1093
+ return static ::withoutEvents (fn () => $ this ->push ());
1094
+ }
1095
+
1086
1096
/**
1087
1097
* Save the model to the database without raising any events.
1088
1098
*
Original file line number Diff line number Diff line change @@ -364,6 +364,17 @@ public function createMany(iterable $records)
364
364
return $ instances ;
365
365
}
366
366
367
+ /**
368
+ * Create a Collection of new instances of the related model without raising any events to the parent model.
369
+ *
370
+ * @param iterable $records
371
+ * @return \Illuminate\Database\Eloquent\Collection
372
+ */
373
+ public function createManyQuietly (iterable $ records )
374
+ {
375
+ return Model::withoutEvents (fn () => $ this ->createMany ($ records ));
376
+ }
377
+
367
378
/**
368
379
* Set the foreign ID for creating a related model.
369
380
*
You can’t perform that action at this time.
0 commit comments