diff --git a/doc/7-many-to-many-polymorphic.md b/doc/7-many-to-many-polymorphic.md index 080677f..254cff2 100644 --- a/doc/7-many-to-many-polymorphic.md +++ b/doc/7-many-to-many-polymorphic.md @@ -64,11 +64,11 @@ Now we should listen our events, for example we can register event listners in m * Many To Many Polymorphic Relationship Events */ - static::morphToManyAttaching(function ($parent, $ids, $attributes) { + static::morphToManyAttaching(function ($relation, $parent, $attributes) { Log::info("Attaching tags to post {$parent->title}."); }); - static::morphToManyAttached(function ($parent, $ids, $attributes) { + static::morphToManyAttached(function ($relation, $parent, $attributes) { Log::info("Tags have been attached to post {$parent->title}."); }); } @@ -151,11 +151,11 @@ Now we should listen our events, for example we can register event listners in m * Many To Many Polymorphic Relationship Events */ - static::morphedByManyAttaching(function ($parent, $ids, $attributes) { + static::morphedByManyAttaching(function ($relation, $parent, $attributes) { Log::info("Attaching post to tag {$parent->name}."); }); - static::morphedByManyAttached(function ($parent, $ids, $attributes) { + static::morphedByManyAttached(function ($relation, $parent, $attributes) { Log::info("Post has been attached to tag {$parent->name}."); }); } @@ -179,4 +179,4 @@ Now we should listen our events, for example we can register event listners in m - events have $relation name, $parent model, $ids detaching model ids, $attributes additional data #### MorphedByMany::updateExistingPivot - fires morphedByManyUpdatingExistingPivot, morphedByManyUpdatedExistingPivot -- events have $relation name, $parent model, $id updating model id, $attributes additional data \ No newline at end of file +- events have $relation name, $parent model, $id updating model id, $attributes additional data