src/Aindong/Pluggables/Console/PluggableMigrateCommand.php
/**
     * Execute the console command.
     *
     * @return mixed
     */
Execute the console command.
@return mixed
Execute the console command . @return mixed
public function fire()
    {
        if (!$this->confirmToProceed()) {
            return;
        }
        $this->prepareDatabase();
        $pluggable = $this->pluggable->getProperties($this->argument('pluggable'));
        if (!empty($pluggable)) {
            if ($this->pluggable->isEnabled($pluggable['slug'])) {
                return $this->migrate($pluggable['slug']);
            } elseif ($this->option('force')) {
                return $this->migrate($pluggable['slug']);
            }
        } else {
            if ($this->option('force')) {
                $pluggables = $this->pluggable->all();
            } else {
                $pluggables = $this->pluggable->getByEnabled();
            }
            foreach ($pluggables as $pluggable) {
                $this->migrate($pluggable['slug']);
            }
        }
    }
public function fire ( ) { if ( ! $ this -> confirmToProceed ( ) ) { return ; } $ this -> prepareDatabase ( ) ; $ pluggable = $ this -> pluggable -> getProperties ( $ this -> argument ( 'pluggable' ) ) ; if ( ! empty ( $ pluggable ) ) { if ( $ this -> pluggable -> isEnabled ( $ pluggable [ 'slug' ] ) ) { return $ this -> migrate ( $ pluggable [ 'slug' ] ) ; } elseif ( $ this -> option ( 'force' ) ) { return $ this -> migrate ( $ pluggable [ 'slug' ] ) ; } } else { if ( $ this -> option ( 'force' ) ) { $ pluggables = $ this -> pluggable -> all ( ) ; } else { $ pluggables = $ this -> pluggable -> getByEnabled ( ) ; } foreach ( $ pluggables as $ pluggable ) { $ this -> migrate ( $ pluggable [ 'slug' ] ) ; } } }
Execute the console command.
Execute the console command .