Cleaner code with Eloquent events →
Eloquent makes it easy to respond to certain key points in the lifecycle of a model instance, by exposing events such as creating
, updating
, and deleted
.
Eloquent makes it easy to respond to certain key points in the lifecycle of a model instance, by exposing events such as creating
, updating
, and deleted
.
There's an important gotcha to remember when working with Eloquent and default database values: if you create a new model instance, without overriding a default value, the attribute will not be set.