src/Commands/MigrateFresh.php
public function handle()
    {
        $database = $this->input->getOption('database');

        $path = $this->input->getOption('path');

        if (! $this->confirmToProceed()) {
            return;
        }

        $this->info('Dropping all tables...');

        event(new DroppingTables());
        if ($database !== null) {
            DB::setDefaultConnection($database);
        }
        $this->getTableDropper()->dropAllTables();
        event(new DroppedTables());

        $this->info('Running migrations...');
        $this->call('migrate', [
            '--database' => $database,
            '--path' => $path,
            '--force' => true,
        ]);

        if ($this->option('seed')) {
            $this->info('Running seeders...');
            $this->call('db:seed', ['--force' => true]);
        }

        $this->comment('All done!');
    }
public function handle()
    {
        $database = $this->input->getOption('database');

        $path = $this->input->getOption('path');

        if (! $this->confirmToProceed()) {
            return;
        }

        $this->info('Dropping all tables...');

        event(new DroppingTables());
        if ($database !== null) {
            DB::setDefaultConnection($database);
        }
        $this->getTableDropper()->dropAllTables();
        event(new DroppedTables());

        $this->info('Running migrations...');
        $this->call('migrate', [
            '--database' => $database,
            '--path' => $path,
            '--force' => true,
        ]);

        if ($this->option('seed')) {
            $this->info('Running seeders...');
            $this->call('db:seed', ['--force' => true]);
        }

        $this->comment('All done!');
    }
Execute the console command.

@return mixed