/** * Execute the console command. * * @return mixed */ public function fire() { $this->module = $this->laravel['modules']; $name = $this->argument('module'); if ($name) { return $this->migrate($name); } foreach ($this->module->getOrdered($this->option('direction')) as $module) { $this->line('Running for module: <info>' . $module->getName() . '</info>'); $this->migrate($module); } }
/** * Get all ordered modules. * * @param string $direction * @return array * @static */ public static function getOrdered($direction = 'asc') { return \YCMS\Modules\Repository::getOrdered($direction); }