Refactor processing of cascaded soft deletes
Refactor processing of cascaded soft deletes

Resolves #13

I've broken the functionality out into separate methods and hopefully
tidied this package up a little in the process.

I've tweaked the behaviour within the (old) static deleting method in
order to handle many-to-many relationships, where a pivot table is
present.

Whilst this works and the failing test supplied now passes, it should be
noted that this can actually be quite database heavy, as we iterate
through each relationship and delete its records recursively. More
records, more delete queries.

I'm open to anybody having a better suggestion to handling this. I've
spent quite a while on it and come to the conclusion that there's a
really good reason this stuff is implemented at the database level. If
you're getting performance issues, it might be time to move away from
soft deletes for this use-case. For smaller datasets, it ought to be
"ok".

michaeldyrynda/laravel-cascade-soft-deletes