/** * Execute the console command. * * @return mixed */ public function fire() { if (!$this->confirmToProceed()) { return null; } $slug = $this->argument('slug'); if (!empty($slug)) { if ($this->module->isEnabled($slug)) { return $this->reset($slug); } elseif ($this->option('force')) { return $this->reset($slug); } } else { if ($this->option('force')) { $modules = $this->module->all()->reverse(); } else { $modules = $this->module->enabled()->reverse(); } foreach ($modules as $module) { $this->reset($module['slug']); } } }
/** * Execute the console command. * * @return mixed */ public function fire() { $this->prepareDatabase(); if (!empty($this->argument('slug'))) { $module = $this->module->where('slug', $this->argument('slug'))->first(); if ($this->module->isEnabled($module['slug'])) { return $this->migrate($module['slug']); } elseif ($this->option('force')) { return $this->migrate($module['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']); } } }
/** * Execute the console command. * * @return mixed */ public function fire() { $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; } else { if ($this->option('force')) { $modules = $this->module->all(); } else { $modules = $this->module->enabled(); } foreach ($modules as $module) { $this->seed($module['slug']); } } }