getOrdered() public method

Get all ordered modules.
public getOrdered ( string $direction = 'asc' ) : array
$direction string
return array
Esempio n. 1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $this->module = $this->laravel['modules'];
     $name = $this->argument('module');
     if ($name) {
         $module = $this->module->findOrFail($name);
         return $this->migrate($module);
     }
     foreach ($this->module->getOrdered($this->option('direction')) as $module) {
         $this->line('Running for module: <info>' . $module->getName() . '</info>');
         $this->migrate($module);
     }
 }
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $this->module = $this->laravel['modules'];
     $name = $this->argument('module');
     if (!empty($name)) {
         $this->reset($name);
         return;
     }
     foreach ($this->module->getOrdered($this->option('direction')) as $module) {
         $this->line('Running for module: <info>' . $module->getName() . '</info>');
         $this->reset($module);
     }
 }