Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete resources when billable is removed #92

Open
driesvints opened this issue May 27, 2024 · 0 comments
Open

Delete resources when billable is removed #92

driesvints opened this issue May 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@driesvints
Copy link
Contributor

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.

@driesvints driesvints added the enhancement New feature or request label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant