Skip to content

Conversation

@solis-eduardo
Copy link

Came across this issue when using owen-it/laravel-auditing.
My Model class uses the Auditable trait, but the events are registered twice because parentIsBooting only accounts for traits used by the parent class itself, to solve this problem I created a static array for parent classes and added an alternative isset verification, similar to the preexisting $parentBootMethods logic.

@solis-eduardo
Copy link
Author

Forgot to mention: it can be bypassed by declaring a empty boot method, like so:

    public static function boot() {
        parent::boot();
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant