PHPackages                             r4nkt/laravel-resource-tidier - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. r4nkt/laravel-resource-tidier

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

r4nkt/laravel-resource-tidier
=============================

A simple-but-opinionated set of classes that allows for configurable tidying of various user resources.

v0.5.0(5y ago)1681MITPHPPHP ^8.0

Since Apr 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/r4nkt/laravel-resource-tidier)[ Packagist](https://packagist.org/packages/r4nkt/laravel-resource-tidier)[ Docs](https://github.com/r4nkt/laravel-resource-tidier)[ GitHub Sponsors](https://github.com/r4nkt)[ RSS](/packages/r4nkt-laravel-resource-tidier/feed)WikiDiscussions main Synced today

READMEChangelog (5)Dependencies (8)Versions (6)Used By (1)

R4nkt's Laravel Resource Tidier
===============================

[](#r4nkts-laravel-resource-tidier)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c81a810e574bb680cbd1c9645fc4e8f5d441dc99ede01f6d89bc1c877f16fa3f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72346e6b742f6c61726176656c2d7265736f757263652d7469646965722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/r4nkt/laravel-resource-tidier)[![GitHub Tests Action Status](https://camo.githubusercontent.com/128aab83d0298b52d4012c45c9eefdd5d90e1daf499bdc899334b26a8cb79594/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f72346e6b742f6c61726176656c2d7265736f757263652d7469646965722f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/r4nkt/laravel-resource-tidier/actions?query=workflow%3Arun-tests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/597abb3db0dd75ebc0df09a4422bc2562c0b693497e54eb9ad5f170e514772f1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f72346e6b742f6c61726176656c2d7265736f757263652d7469646965722f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/r4nkt/laravel-resource-tidier/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/f538ee6d7daa2aa8f67c695548863d28dcfe950d029b5109c00e6ac3d4955bf7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72346e6b742f6c61726176656c2d7265736f757263652d7469646965722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/r4nkt/laravel-resource-tidier)

A simple-but-opinionated set of classes that allows for configurable tidying of various user resources. It allows you to configure "tidiers", which find resources that need to be tidied up, culling them, notifying resource owners, and eventually performing the tidying-up task. It also allows for "unmarking" resources if/when the circumstances demand it.

This package was developed to scratch an itch, but it was also inspired by [Freek](https://twitter.com/freekmurze) and his [blog post](https://freek.dev/1940-why-and-how-you-should-remove-inactive-users-and-teams) about removing inactive users and teams.

It should also be noted that it's the foundation for another [r4nkt](https://twitter.com/r4nkt) [package](https://github.com/r4nkt/laravel-saasparilla), which may be useful in your own projects or as an example on how to use `laravel-resource-tidier`.

Finally, it's important to point out that this package benefitted from [Spatie's](https://spatie.be) [Laravel package skeleton package](https://github.com/spatie/package-skeleton-laravel).

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require r4nkt/laravel-resource-tidier
```

You can publish the config file with:

```
php artisan vendor:publish --provider="R4nkt\ResourceTidier\ResourceTidierServiceProvider" --tag="laravel-resource-tidier-config"
```

This is the contents of the published config file:

```
