Open eporsche opened 5 years ago
I'm not sure I understand. Wouldn't the saved
event cover you?
Let's say I have an invoice with multiple line items and I want to raise an event when the invoice and all of its line items have been saved to the database. The saved event on the invoice or on the line items will tell me if they have been saved individually but won't tell me if the complete invoice has been saved.
Currently there is no way to register a listener after both the model and its fiillable relations have been saved. I would like to propose something like:
$model->fireHasFillableRelationsEvent('created_with_relations');
after the save method in the HasFillableRelations trait.