/** * Execute the console command. * * @return mixed */ public function fire() { $module = $this->argument('module'); $moduleName = studly_case($module); if (isset($module)) { if (!$this->module->exists($module)) { return $this->error("Module [{$moduleName}] does not exist."); } if ($this->module->isEnabled($module)) { $this->seed($module); } elseif ($this->option('force')) { $this->seed($module); } return; } else { 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 null; } $module = $this->argument('module'); if (!empty($module)) { if ($this->module->isEnabled($module)) { return $this->reset($module); } elseif ($this->option('force')) { return $this->reset($module); } } else { if ($this->option('force')) { $modules = $this->module->all(); $modules = $modules->reverse(); } else { $modules = $this->module->enabled()->reverse(); } foreach ($modules as $module) { $this->reset($module['slug']); } } }
/** * Execute the console command. * * @return mixed */ public function fire() { if (!$this->confirmToProceed()) { return null; } $this->prepareDatabase(); $module = $this->module->getProperties($this->argument('module')); if (!is_null($module)) { if ($this->module->isEnabled($module['slug'])) { return $this->migrate($module['slug']); } elseif ($this->option('force')) { return $this->migrate($module['slug']); } } else { if ($this->option('force')) { $modules = $this->module->all(); } else { $modules = $this->module->enabled(); } foreach ($modules as $module) { $this->migrate($module['slug']); } } }