src/Console/Commands/NetworkConfigCommand.php
protected function finalizeSetup()
    {
        // Run migrations if possible
        $attemptMigrate = false;

        if ($this->connection === 'sqlite') {
            $attemptMigrate = $this->createSqliteDatabase();
        } else {
            $attemptMigrate = $this->canConnectToDb();
        }

        sleep(1);

        if ($attemptMigrate) {
            // We need to reconnect using new settings if we're running SQLite
            if ($this->connection === 'sqlite') {
                app()['db']->reconnect();
            }

            $this->call('migrate', ['--force' => true]);

            // Mark as installer complete
            Storage::put('installer', '2');

            sleep(1);

            // Create the first user's account if we need to
            if (User::count() < 1) {
                $this->info("Now let's create your user account...");
                $this->call('network:user', ['--name' => $this->user_name]);
            }
        }

        // Make the symlinks we need
        $this->createSymlinks();

        sleep(1);

        if (! $this->hasError) {
            $this->alert("Great news, {$this->user_name}: your Network is set up! I hope you enjoy using Network.");
        } else {
            $this->warn("Sorry, {$this->user_name}, I couldn't complete your Network setup this time.");
            $this->warn("Please check the warning messages to see what you need to do and rerun `php artisan network:config`.");
        }
    }
protected function finalizeSetup()
    {
        // Run migrations if possible
        $attemptMigrate = false;

        if ($this->connection === 'sqlite') {
            $attemptMigrate = $this->createSqliteDatabase();
        } else {
            $attemptMigrate = $this->canConnectToDb();
        }

        sleep(1);

        if ($attemptMigrate) {
            // We need to reconnect using new settings if we're running SQLite
            if ($this->connection === 'sqlite') {
                app()['db']->reconnect();
            }

            $this->call('migrate', ['--force' => true]);

            // Mark as installer complete
            Storage::put('installer', '2');

            sleep(1);

            // Create the first user's account if we need to
            if (User::count() < 1) {
                $this->info("Now let's create your user account...");
                $this->call('network:user', ['--name' => $this->user_name]);
            }
        }

        // Make the symlinks we need
        $this->createSymlinks();

        sleep(1);

        if (! $this->hasError) {
            $this->alert("Great news, {$this->user_name}: your Network is set up! I hope you enjoy using Network.");
        } else {
            $this->warn("Sorry, {$this->user_name}, I couldn't complete your Network setup this time.");
            $this->warn("Please check the warning messages to see what you need to do and rerun `php artisan network:config`.");
        }
    }
protected function finalizeSetup ( ) { // Run migrations if possible $ attemptMigrate = false ; if ( $ this -> connection === 'sqlite' ) { $ attemptMigrate = $ this -> createSqliteDatabase ( ) ; } else { $ attemptMigrate = $ this -> canConnectToDb ( ) ; } sleep ( 1 ) ; if ( $ attemptMigrate ) { // We need to reconnect using new settings if we're running SQLite if ( $ this -> connection === 'sqlite' ) { app ( ) [ 'db' ] -> reconnect ( ) ; } $ this -> call ( 'migrate' , [ '--force' => true ] ) ; // Mark as installer complete Storage :: put ( 'installer' , '2' ) ; sleep ( 1 ) ; // Create the first user's account if we need to if ( User :: count ( ) < 1 ) { $ this -> info ( "Now let's create your user account..." ) ; $ this -> call ( 'network:user' , [ '--name' => $ this -> user_name ] ) ; } } // Make the symlinks we need $ this -> createSymlinks ( ) ; sleep ( 1 ) ; if ( ! $ this -> hasError ) { $ this -> alert ( "Great news, {$this->user_name}: your Network is set up! I hope you enjoy using Network." ) ; } else { $ this -> warn ( "Sorry, {$this->user_name}, I couldn't complete your Network setup this time." ) ; $ this -> warn ( "Please check the warning messages to see what you need to do and rerun `php artisan network:config`." ) ; } }
Run main setup after we know we have the .env in place.
Run main setup after we know we have the . env in place .