I was looking at the code in the delete method of the Model object in Model.php. The code eventually calls a delete on the database but the return value from that call is ignored and it is assumed to be successful. There is even a comment to that effect in the code:
// Once the model has been deleted, we will fire off the deleted event so that
// the developers may hook into post-delete operations. We will then return
// a boolean true as the delete is presumably successful on the database.
Why does the code ignore the return code from the delete? Why assume that the delete was successful?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community