Posted by Shailesh Davara on November 11, 2014 | 2 Minute Read
In my earlier post of laravel eloquent, I told you that it’s a very powerful ORM. It comes with many functionalities that we could imagine to have with any ORM.
One of the feature, we need is to have any way to hookup with model events.(i.e save, update etc.). Thankfully, It provides a set of methods to work with like of creating, created, updating, updated, saving, saved, deleting, deleted, restoring, restored.
These methods can be hooked up with model event and we can take a certain action. Below code will show, how to implement it. I’ve done that with help of boot method of the model.