Upload beautify
This commit is contained in:
@@ -2,7 +2,15 @@
|
||||
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use App\Uploads\Services\CleanupService;
|
||||
|
||||
Artisan::command('inspire', function () {
|
||||
$this->comment(Inspiring::quote());
|
||||
})->purpose('Display an inspiring quote');
|
||||
|
||||
Artisan::command('uploads:cleanup {--limit=100 : Maximum drafts to clean in one run}', function (): void {
|
||||
$limit = (int) $this->option('limit');
|
||||
$deleted = app(CleanupService::class)->cleanupStaleDrafts($limit);
|
||||
|
||||
$this->info("Uploads cleanup deleted {$deleted} draft(s).");
|
||||
})->purpose('Delete stale draft uploads and temporary files');
|
||||
|
||||
Reference in New Issue
Block a user