spatie / laravel-model-cleanup

Clean up unneeded records
https://freek.dev/410-a-laravel-package-to-clean-up-models
MIT License
399 stars 42 forks source link

feature - search directories recursively #24

Closed wardhache closed 5 years ago

wardhache commented 5 years ago

Instead of looking for only the files directly underneath the specified directories, it looks for all the files underneath the directories and their sub directories.

See issue #21

freekmurze commented 5 years ago

Thanks!

dmason30 commented 4 years ago

Hi @freekmurze / @wardhache ,

Would you be open to making this configurable? I have an issue where the scheduled job is failing on deployed environments as it running reflection on a ServiceProvider that extends a packages ServiceProvider that we only have installed locally (require-dev in composer.json) laravel/telescope and all my models are in the usual spot in the root of the app folder. .e.g. app/User.php.

Ideally the paths should be wildcarded using the standard pattern /** when you want to search in a recursive manner but it could just be a simple overriding config option recursive that defaults to true.

freekmurze commented 4 years ago

Sure, submit a PR with a new config option, updated tests and updated readme.