Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Is there a way to perform validation on delete? #304

Open
IvanRibakov opened this issue Jun 12, 2017 · 0 comments
Open

Is there a way to perform validation on delete? #304

IvanRibakov opened this issue Jun 12, 2017 · 0 comments

Comments

@IvanRibakov
Copy link

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)?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant