Skip to content

Commit

Permalink
Use the getAttributes method on insert (#25349)
Browse files Browse the repository at this point in the history
Update the performInsert method to use getAttributes instead of accessing the property directly.
  • Loading branch information
ollieread authored and taylorotwell committed Aug 27, 2018
1 parent 65a82db commit 61bdc1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ protected function performInsert(Builder $query)
// If the model has an incrementing key, we can use the "insertGetId" method on
// the query builder, which will give us back the final inserted ID for this
// table from the database. Not all tables have to be incrementing though.
$attributes = $this->attributes;
$attributes = $this->getAttributes();

if ($this->getIncrementing()) {
$this->insertAndSetId($query, $attributes);
Expand Down

0 comments on commit 61bdc1f

Please sign in to comment.