Skip to content

[Proposal] Fire events on relationship creation #2303

Closed
@hailwood

Description

@hailwood

Presently there is no way to know when a relationship has been created via

Model::find(1)->something->save($anotherSomething);

This proposal puts forward the idea of firing relationship.creating, relationship.created, relationship.destroying, relationship.destroyed events in the same manner as saving a model.

This allows us to do awesome things like setup another relationship automatically when this relationship is setup, or send a "Dude someone joined your crew" email when a new relationship is added!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions