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.
In regard to #90. We should actually remove the related resources when a billable gets deleted. Ideally we can do this through Eloquent's
deletingevent but when using mass deletion these do not trigger, see https://laravel.com/docs/11.x/eloquent#eventsI 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.