-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove attribute filling from pivot model
- Loading branch information
1 parent
49770ec
commit a738129
Showing
2 changed files
with
4 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,7 +80,7 @@ public static function fromAttributes(Model $parent, $attributes, $table, $exist | |
*/ | ||
public static function fromRawAttributes(Model $parent, $attributes, $table, $exists = false) | ||
{ | ||
$instance = static::fromAttributes($parent, $attributes, $table, $exists); | ||
$instance = static::fromAttributes($parent, [], $table, $exists); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
luchaos
Contributor
|
||
|
||
$instance->setRawAttributes($attributes, true); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this breaks
Pivot::hasTimestampAttributes()
detecting that the model has timestamps when supplying the$using
parameter inModel::newPivot()
as that check only happens inPivot::fromAttributes()
and raw attributes are populated afterwards.I was wondering why suddenly my pivot tables, that are updated through a custom Pivot Model, won't update their timestamps anymore.