info('Clearing database tables...'); Schema::disableForeignKeyConstraints(); // Truncate recruitment, dynamic, and worker tables DB::table('shortlists')->truncate(); DB::table('job_applications')->truncate(); DB::table('job_posts')->truncate(); DB::table('messages')->truncate(); DB::table('conversations')->truncate(); DB::table('announcements')->truncate(); DB::table('worker_documents')->truncate(); DB::table('worker_skills')->truncate(); DB::table('workers')->truncate(); // Also delete non-seeded users if any (keep Admin and Employer) DB::table('users')->whereNotIn('email', ['admin@example.com', 'employer1@example.com'])->delete(); Schema::enableForeignKeyConstraints(); $this->info('Database cleared successfully! You can now register, post jobs, and apply manually.'); return Command::SUCCESS; } }