Mity Docs Mity Docs for Mity Digital
Form Submission Cleaner Documentation

How to use

First things first, install and configure Form Submission Cleaner for Statamic.

Include the command

Running the command differs based on the app structure you're using.

Note that instead of using daily() you could change this to run at a different time, or more frequently too. Refer to the Laravel Scheduling docs for more details.

Laravel 11 (new app structure)

If you have adopted the new app structure introduced with Laravel 11, you'll need to update your site's routes/console.php file, and run the Form Submission Cleaner command.

1use Illuminate\Support\Facades\Schedule;
2 
3Schedule::command('statamic:form-submission-cleaner:run')->daily();

Laravel 10 (or old app structure)

In your site's app/Console/Kernel.php file, run the Form Submission Cleaner command:

1protected function schedule(Schedule $schedule)
2{
3 $schedule->command('statamic:form-submission-cleaner:run')->daily();
4}

Set up Laravel's Task Scheduler

The Form Submission Cleaner command will be run from Laravel's Task Scheduler.

You will need to do this on your server, and how you tackle this can vary. You may want to refer to Laravel's docs for more details.

If you're using Laravel Forge, you can simply flick the toggle switch on your Site's main page to have Forge set this up for you.