Skip to content

Commit 862371f

Browse files
authored
Merge pull request #11 from hubov/master
Fix double model assignment to payload breaking closures params in events
2 parents 48dc3cc + c6f177f commit 862371f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Traits/ExtendFireModelEventTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ public function fireModelEvent(
3737
}
3838

3939
$payload = [
40-
0 => $this,
4140
'model' => $this,
4241
'relation' => $relationName,
4342
'pivotIds' => $ids,
44-
'pivotIdsAttributes' => $idsAttributes
43+
'pivotIdsAttributes' => $idsAttributes,
44+
0 => $this,
4545
];
4646
$result = $result
4747
?: static::$dispatcher

0 commit comments

Comments
 (0)