Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wait for the dispatcher to be set before booting model events
This fixes an issue that occurs when a model class is instantiated before the DatabaseServiceProvider can be booted (thus calling Model::setEventDispatcher()). Previously Winter would proceed with booting the nicer events, and then helpfully set a flag the events for the current model class had already been booted; however this would cause any and all "nice" model events to fail since they were never actually registered with an event dispatcher since Laravel silently discarded the required listeners when the $dispatcher property wasn't set.
- Loading branch information