option('force')) { if (! confirm('Are you sure you want to reset the application?')) { $this->components->error('Reset cancelled'); return; } } // Enable maintenance mode to prevent access during reset $this->info('Activating maintenance mode...'); Artisan::call('down'); // Fresh migrate database and run initial seeds $this->info('Running migrate:fresh'); Artisan::call('migrate:fresh --seed --force'); // Seed demo data $this->info('Seeding database'); Artisan::call('db:seed', ['--class' => 'DemoSeeder', '--force' => true]); // Clear all application caches $this->info('Clearing cache...'); Artisan::call('optimize:clear'); // Disable maintenance mode $this->info('Deactivating maintenance mode...'); Artisan::call('up'); $this->info('App reset completed successfully!'); } }