PHPackages                             tightenco/quicksand - 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. [Database &amp; ORM](/categories/database)
4. /
5. tightenco/quicksand

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

tightenco/quicksand
===================

Easily schedule regular cleanup of old soft-deleted Eloquent data.

v2.7.0(2y ago)294175.1k↓73.8%18[1 issues](https://github.com/tighten/quicksand/issues)[1 PRs](https://github.com/tighten/quicksand/pulls)MITPHPPHP ^8.1

Since Jul 15Pushed 2y ago5 watchersCompare

[ Source](https://github.com/tighten/quicksand)[ Packagist](https://packagist.org/packages/tightenco/quicksand)[ Docs](https://github.com/tighten/quicksand)[ RSS](/packages/tightenco-quicksand/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (9)Versions (22)Used By (0)

[![Quicksand logo](https://raw.githubusercontent.com/tighten/quicksand/main/quicksand-banner.png)](https://raw.githubusercontent.com/tighten/quicksand/main/quicksand-banner.png)

Quicksand
=========

[](#quicksand)

[![Tests](https://github.com/tighten/quicksand/workflows/Tests/badge.svg)](https://github.com/tighten/quicksand/workflows/Tests/badge.svg)

Schedule a force delete of your soft deleted Eloquent models or pivot tables after they've been soft deleted for a given period of time.

Quicksand is an Artisan command that you can run in your scheduler daily.

Requirements
------------

[](#requirements)

- If you are using Laravel 5.6 or higher, use version `2.0` of this package.
- If you are using Laravel 5.5 and running PHP 7.1 or higher, use version `1.0` of this package.
- If you are using Laravel 5.4 or lower, or PHP 7.0 or lower, please use version `0.2` of this package.

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

[](#installation)

1. Add Quicksand to your Composer file: `composer require tightenco/quicksand`
2. Register the Quicksand Service provider in `config/app.php` (you can skip this step if you're using Laravel 5.5 or higher due to package auto-discovery):

    ```
    'providers' => [
        ...

        Tightenco\Quicksand\QuicksandServiceProvider::class,
    ```
3. Publish your config: `php artisan vendor:publish --provider="Tightenco\Quicksand\QuicksandServiceProvider"`
4. Edit your config. Define which classes and/or pivot tables you'd like to have Quicksand clean up for you, how many days Quicksand should wait to clean up, and whether or not the results should be logged. The default `'days'` until cleaning up is overridable by specifying a `'days'` key when registering a model or pivot table:

    1. *Note: Quicksand will disregard any global scopes applied to models when deleting.*
    2. *Note: Prior to version 2.3 the `deletables` configuration key was named `models` and did not support pivot tables.*

    ```
    'days' => 30,

    'deletables' => [
        App\Default::class,
        App\CleanEveryTwentyDays::class => [
            'days'  => 20 // override default 'days'
        ],
        'example_pivot',
        'example_pivot' => [
            'days'  => 20 // override default 'days'
        ]
    ]
    ```
5. Schedule the command in `app/Console/Kernel.php`:

    ```
    protected function schedule(Schedule $schedule)
    {
        $schedule->command('quicksand:run')
            ->daily();
    }
    ```

### Using a Custom Log File

[](#using-a-custom-log-file)

If you are using Laravel 5.6 or higher, you can customize the logger Quicksand uses by adding a `quicksand` channel to your `logging.php` config file like so:

```
'channels' => [
    /* ... */
    'quicksand' => [
        'driver' => 'single',
        'path' => storage_path('logs/quicksand.log'),
        'level' => 'info',
    ],
]
```

If you are using Laravel 5.5 or lower, you can customize the logger Quicksand uses by editing the `custom_log_file` option in your `quicksand.php` config file.

By default, Quicksand will log to the standard `laravel.log` file.

Versioning
----------

[](#versioning)

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/tighten/quicksand/tags).

Authors
-------

[](#authors)

- **Benson Lee** - [besologic](https://github.com/besologic)
- **Matt Stauffer** - [mattstauffer](https://github.com/mattstauffer)

See also the list of [contributors](https://github.com/tighten/quicksand/graphs/contributors) who participated in this project.

This package is developed and maintained by [Tighten](https://tighten.co).

Testing
-------

[](#testing)

You can test this package by running

```
composer test

```

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~155 days

Recently: every ~320 days

Total

19

Last Release

844d ago

Major Versions

v0.2.4 → v1.0.02018-04-13

v1.0.0 → v2.0.02018-09-19

PHP version history (5 changes)v2.0.0PHP ^7.1.3

v2.4.2PHP ^7.1.3|^8.0

v2.5.0PHP ^7.1.3 || ~8.0.0 || ~8.1.0

v2.6.0PHP ^7.1.3 || ~8.0

v2.7.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/151829?v=4)[Matt Stauffer](/maintainers/mattstauffer)[@mattstauffer](https://github.com/mattstauffer)

---

Top Contributors

[![imjohnbon](https://avatars.githubusercontent.com/u/1489975?v=4)](https://github.com/imjohnbon "imjohnbon (27 commits)")[![besologic](https://avatars.githubusercontent.com/u/122173?v=4)](https://github.com/besologic "besologic (22 commits)")[![mattstauffer](https://avatars.githubusercontent.com/u/151829?v=4)](https://github.com/mattstauffer "mattstauffer (17 commits)")[![josecanhelp](https://avatars.githubusercontent.com/u/2329654?v=4)](https://github.com/josecanhelp "josecanhelp (15 commits)")[![mateusjunges](https://avatars.githubusercontent.com/u/19756164?v=4)](https://github.com/mateusjunges "mateusjunges (9 commits)")[![bakerkretzmar](https://avatars.githubusercontent.com/u/18192441?v=4)](https://github.com/bakerkretzmar "bakerkretzmar (6 commits)")[![LKaemmerling](https://avatars.githubusercontent.com/u/4281581?v=4)](https://github.com/LKaemmerling "LKaemmerling (4 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (4 commits)")[![tomschlick](https://avatars.githubusercontent.com/u/70184?v=4)](https://github.com/tomschlick "tomschlick (2 commits)")[![DavyDeCoster](https://avatars.githubusercontent.com/u/6095391?v=4)](https://github.com/DavyDeCoster "DavyDeCoster (2 commits)")[![hanspagel](https://avatars.githubusercontent.com/u/1577992?v=4)](https://github.com/hanspagel "hanspagel (2 commits)")[![loganhenson](https://avatars.githubusercontent.com/u/2792946?v=4)](https://github.com/loganhenson "loganhenson (1 commits)")[![dwightwatson](https://avatars.githubusercontent.com/u/1100408?v=4)](https://github.com/dwightwatson "dwightwatson (1 commits)")[![scottgrayson](https://avatars.githubusercontent.com/u/7796074?v=4)](https://github.com/scottgrayson "scottgrayson (1 commits)")[![Scumi](https://avatars.githubusercontent.com/u/26870072?v=4)](https://github.com/Scumi "Scumi (1 commits)")[![svenluijten](https://avatars.githubusercontent.com/u/11269635?v=4)](https://github.com/svenluijten "svenluijten (1 commits)")[![ahallhognason](https://avatars.githubusercontent.com/u/56840000?v=4)](https://github.com/ahallhognason "ahallhognason (1 commits)")

---

Tags

eloquenthacktoberfestlaravelpivot-tablesquicksand

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tightenco-quicksand/health.svg)

```
[![Health](https://phpackages.com/badges/tightenco-quicksand/health.svg)](https://phpackages.com/packages/tightenco-quicksand)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k91.9k1](/packages/mike-bronner-laravel-model-caching)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k29.9M146](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
