Quicksand
Schedule a force delete of your soft deleted Eloquent models 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.
Installation instructions
-
Add Quicksand to your Composer file:
composer require tightenco/quicksand
-
Register the Quicksand Service provider in
config/app.php
:'providers' => [ ... Tightenco\Quicksand\QuicksandServiceProvider::class,
-
Publish your config:
php artisan vendor:publish --provider="Tightenco\Quicksand\QuicksandServiceProvider"
-
Edit your config. Define which classes you'd like to have Quicksand clean up for you, and how many days Quicksand should wait to clean up.
-
Schedule the command in
app/Console/Kernel.php
:protected function schedule(Schedule $schedule) { $schedule->command('quicksand:run') ->daily(); }