Skip to content

Delete resources when billable is removed #92

Description

@driesvints

In regard to #90. We should actually remove the related resources when a billable gets deleted. Ideally we can do this through Eloquent's deleting event but when using mass deletion these do not trigger, see https://laravel.com/docs/11.x/eloquent#events

I believe we should consider to refactor the mapping of resources to refer to the customer record and not to the billable anymore. Then we can work with foreign key constraints and have a single related model which we can remove. As said above, most likely this will need to become an app-triggered action as we can't rely on events.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions