Laravel's seeder runs a variety of Model Events on my models which trigger New Order notification emails, among other things, from the Product::saved()
Model Event.
This significantly slows down database seeding. Is it possible to detect whether a Seed is being ran and if so, tell Laravel not to run the Model Events?
There are functions on the Model
class which will allow you to ignore events.
Before using a model to seed, you will need to do something like this...
YourModel::flushEventListeners();