2

I am creating custom unique ids for some of my models. To this end I have created a trait that adds a hook to the creating event on the models that uses it, to generate and set a unique Id.

When I create a model from tinker this works fine. But my seeders are complaining that the id is missing. When I searched for answers to this problem I saw a bunch of posts about disabling the events in Laravel 5.

Can someone confirm that they have been disabled in Laravel 6? Is there any way to reenable them? Or do I have to manually set the ids for the effected models in the seeders?

kaan_a
  • 3,503
  • 1
  • 28
  • 52

0 Answers0