Callbacks
Call a specified method on a specific life cycle event.
Here is an example:
You can register callbacks for the following events:
Create
before_save
before_create
save
after_create
after_save
Update
before_save
before_update
save
after_update
after_save
Destroy
before_destroy
destroy
after_destroy
Last updated