Skip to content

Pivot events do not fire #8452

Closed
Closed
@tpavlek

Description

@tpavlek

When creating (or performing any other action on a Pivot table), no model events are fired.

There is a proof of concept repository here: https://github.com/tpavlek/pivot-events-test

WelcomeController@index creates a new user and a new role, and attaches the role to the user. in AppServiceProvider we register this in boot()

    Pivot::creating(function($event) {
        \Log::info("Creating pivot...");
    });

Even after running the function in WelcomeController no data is logged, meaning no Pivot creating event was fired.

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