Attachment Temp Cleanup (Cron)
Command
php artisan sp-laravel-api:clean-temp-attachments
Cleanup Logic
The command targets only temp_private and temp_public:
- Expire-first: delete rows where
temp_timeout <= now(). - Fallback: if
temp_timeoutis null, delete rows older thancreated_at + attachments.temp_lifetime.
Suggested Schedule
php
protected function schedule(Schedule $schedule)
{
$schedule->command('sp-laravel-api:clean-temp-attachments')->daily();
}Safety Options
--dry-run--force--minutes=override