April 2015
Beginner
144 pages
3h 13m
English
Eloquent fires numerous events at different points, such as when a model is being saved or deleted. The following is a list of methods Eloquent models can fire:
creatingcreatedupdatingupdatedsavingsaveddeletingdeletedrestoringrestoredThe names are self-explanatory. The difference in the past and present participles is that events such as creating are fired before the model is created, whereas created is fired after the model has been created. Therefore, if you were to halt execution within a handler for the creating event, the record will not be saved; whereas, if you halted execution within a handler for the created event, the record would still be persisted to the database.
It's quite open-ended as to where ...
Read now
Unlock full access