File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
src/Illuminate/Database/Eloquent/Relations Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -59,17 +59,6 @@ public function make(array $attributes = [])
5959 });
6060 }
6161
62- /**
63- * Set the foreign ID for creating a related model.
64- *
65- * @param \Illuminate\Database\Eloquent\Model $model
66- * @return void
67- */
68- protected function setForeignAttributesForCreate (Model $ model )
69- {
70- $ model ->setAttribute ($ this ->getForeignKeyName (), $ this ->getParentKey ());
71- }
72-
7362 /**
7463 * Set the base constraints on the relation query.
7564 *
@@ -315,6 +304,17 @@ public function createMany(array $records)
315304 return $ instances ;
316305 }
317306
307+ /**
308+ * Set the foreign ID for creating a related model.
309+ *
310+ * @param \Illuminate\Database\Eloquent\Model $model
311+ * @return void
312+ */
313+ protected function setForeignAttributesForCreate (Model $ model )
314+ {
315+ $ model ->setAttribute ($ this ->getForeignKeyName (), $ this ->getParentKey ());
316+ }
317+
318318 /**
319319 * Perform an update on all the related models.
320320 *
You can’t perform that action at this time.
0 commit comments