laravel/framework — pull request #4218 by crynobone (2014-04-21 10:19:51+00:00)
Title: [Proposal] Abstract Eloquent observe/events to ObservableTrait.

Initially I asked @taylorotwell on irc whether we can abstract observe/events to utilize traits and he needed to see some pseudo code, so this PR is mainly an example of what I'm proposing.

The idea is to be able to attach observable/events outside of Eloquent, a real use case that I would use this would be with Repository pattern where I could add observe methods without depending on Eloquent (this would mean that the events would still works when I decide to more from Eloquent to something else, say MongoDB for example).