tighten / parental

Use single table inheritance in your Laravel app
MIT License
1.36k stars 98 forks source link

Booted method of parent called #124

Open jorisnoo opened 9 months ago

jorisnoo commented 9 months ago

Hi there, and first of all many thanks for all the effort put into this great and helpful package! 🙏

With the latest release 1.3.6, it appears that some behaviour has changed. I have both a parent and a child model that both implement a booted method:

protected static function booted(): void
    {
        static::creating(static function (self $model) {
            //
        });
    }

Now, when creating a new Child model, it seems like the creating method of the child model is no longer invoked, but the booted method of the parent is called instead. Is this the expected behaviour, or am I missing something?

Thank you!