/** * Execute the console command. */ public function fire() { if (!$this->confirmToProceed()) { return; } $this->output->writeln('<info>Run application migrations ...</info>'); $this->call('migrate'); $this->output->writeln('<info>Run modules migrations ...</info>'); $installer = new ModulesInstaller(ModulesLoader::getRegisteredModules()); $installer->cleanOutputMessages(); if ($this->input->getOption('rollback')) { $installer->resetModules(); } $installer->migrateModules(); foreach ($installer->getOutputMessages() as $message) { $this->output->writeln($message); } // Finally, if the "seed" option has been given, we will re-run the database // seed task to re-populate the database, which is convenient when adding // a migration and a seed at the same time, as it is only this command. if ($this->input->getOption('seed')) { $this->call('db:seed'); $this->call('modules:seed'); } }
/** * Execute the console command. */ public function fire() { if (!$this->confirmToProceed()) { return; } $this->output->writeln('<info>Seeding KodiCMS modules...</info>'); $installer = new ModulesInstaller(ModulesLoader::getRegisteredModules()); $installer->cleanOutputMessages(); $installer->seedModules(); foreach ($installer->getOutputMessages() as $message) { $this->output->writeln($message); } }