Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.
This repository was 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

Description

@IvanRibakov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions