Caffeinated\Modules\Console\Commands\ModuleMigrateRefreshCommand::fire PHP Метод

fire() публичный Метод

Execute the console command.
public fire ( ) : mixed
Результат mixed
    public function fire()
    {
        if (!$this->confirmToProceed()) {
            return;
        }
        $slug = $this->argument('slug');
        $this->call('module:migrate:reset', ['slug' => $slug, '--database' => $this->option('database'), '--force' => $this->option('force'), '--pretend' => $this->option('pretend')]);
        $this->call('module:migrate', ['slug' => $slug, '--database' => $this->option('database')]);
        if ($this->needsSeeding()) {
            $this->runSeeder($slug, $this->option('database'));
        }
        if (isset($slug)) {
            $module = $this->laravel['modules']->where('slug', $slug);
            event($slug . '.module.refreshed', [$module, $this->option()]);
            $this->info('Module has been refreshed.');
        } else {
            $this->info('All modules have been refreshed.');
        }
    }