ardent icon indicating copy to clipboard operation
ardent copied to clipboard

Is there a way to perform validation on delete?

Open IvanRibakov opened this issue 8 years ago • 0 comments

I'm using soft-delete with my currency model and would like to enforce foreign key integrity by checking that regions hasMany relationship is empty before any currency is allowed to be deleted. Will validation be performed on $currency->delete() call? If not, is there a way to enforce this behaviour on the model level (to avoid replicating same logic in multiple places)?

IvanRibakov avatar Jun 12 '17 08:06 IvanRibakov