/** * Execute the console command. * * @return mixed */ public function fire() { if (!$this->confirmToProceed()) { return; } $slug = $this->argument('slug'); if (isset($slug)) { if (!$this->module->exists($slug)) { return $this->error('Module does not exist.'); } if ($this->module->isEnabled($slug)) { $this->seed($slug); } elseif ($this->option('force')) { $this->seed($slug); } return; } if ($this->option('force')) { $modules = $this->module->all(); } else { $modules = $this->module->enabled(); } foreach ($modules as $module) { $this->seed($module['slug']); } }
/** * Execute the console command. * * @return mixed */ public function fire() { if (!$this->confirmToProceed()) { return; } $this->prepareDatabase(); $slug = $this->argument('slug'); if (!empty($slug)) { if (!$this->module->exists($slug)) { return $this->error('Module does not exist.'); } if ($this->module->isEnabled($slug)) { return $this->migrate($slug); } else { return $this->error('Nothing to migrate.'); } } else { if ($this->option('force')) { $modules = $this->module->all(); } else { $modules = $this->module->enabled(); } foreach ($modules as $module) { $this->migrate($module['slug']); } } }
/** * Get all modules. * * @return array */ protected function getModules() { $modules = $this->module->all(); $results = array(); foreach ($modules as $module) { $results[] = $this->getModuleInformation($module); } return array_filter($results); }
/** * Execute the console command. * * @return mixed */ public function fire() { if (!$this->confirmToProceed()) { return; } $slug = $this->argument('slug'); if ($slug) { if (!$this->module->exists($slug)) { return $this->error('Module does not exist.'); } return $this->rollback($slug); } foreach ($this->module->all() as $module) { $this->rollback($module['slug']); } }