Files
hub/app/Console/Commands/CleanupTempFiles.php
kelly 84e81272a5 feat: Product and inventory management system with media improvements
- Complete product and inventory management system
- Media storage service with proper path conventions
- Image handling with dynamic resizing
- Database migrations for inventory tracking
- Import tools for legacy data migration
- Documentation improvements

- InventoryItem, InventoryMovement, InventoryAlert models with hashid support
- Purchase order tracking on inventory alerts
- Inventory dashboard for sellers
- Stock level monitoring and notifications

- MediaStorageService enforcing consistent path conventions
- Image controller with dynamic resizing capabilities
- Migration tools for moving images to MinIO
- Proper slug-based paths (not IDs or hashids)

- ImportProductsFromRemote command
- ImportAlohaSales, ImportThunderBudBulk commands
- ExploreRemoteDatabase for schema inspection
- Legacy data migration utilities

- Product variations table
- Remote customer mappings
- Performance indexes for stats queries
- Social media fields for brands
- Module flags for businesses

- New migrations for inventory, hashids, performance indexes
- New services: MediaStorageService
- New middleware: EnsureBusinessHasModule, EnsureUserHasCapability
- Import commands for legacy data
- Inventory models and controllers
- Updated views for marketplace and seller areas
- Documentation reorganization (archived old docs)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 18:40:54 -07:00

29 lines
675 B
PHP

<?php
namespace App\Console\Commands;
use App\Services\MediaStorageService;
use Illuminate\Console\Command;
class CleanupTempFiles extends Command
{
protected $signature = 'media:cleanup-temp';
protected $description = 'Clean up temporary files older than 24 hours from MinIO storage';
public function handle(): int
{
$this->info('🧹 Cleaning up temporary files...');
$deleted = MediaStorageService::cleanupTempFiles();
if ($deleted > 0) {
$this->info("✅ Deleted {$deleted} temporary file(s)");
} else {
$this->info('✅ No temporary files to clean up');
}
return 0;
}
}