private function saveConfiguration()
    {
        $this->info("Writing configuration file...");

        // Save in .env file
        $this->env->setEnv(
            [
            'APP_URL' => $this->APP_URL,
            'DB_CONNECTION' => $this->DB_TYPE,
            'DB_HOST' => $this->DB_HOST,
            'DB_PORT' => $this->DB_PORT,
            'DB_DATABASE' => $this->DB_DATABASE,
            'DB_USERNAME' => $this->DB_USERNAME,
            'DB_PASSWORD' => $this->DB_PASSWORD,
            ]
        );

        // save in runtime

        config(['app.url' => $this->APP_URL]);
        config(['app.name' => str_replace(' ', '_', $this->APP_NAME)]);
        config(['database.connections.mysql.driver' => $this->DB_TYPE]);
        config(['database.connections.mysql.host' => $this->DB_HOST]);
        config(['database.connections.mysql.port' => $this->DB_PORT]);
        config(['database.connections.mysql.database' => $this->DB_DATABASE]);
        config(['database.connections.mysql.username' => $this->DB_USERNAME]);
        config(['database.connections.mysql.password' => $this->DB_PASSWORD]);

        // save in app.config
        $content = File::get(config_path('app.php'));
        $newContent = str_replace(
            "'name' => '".config('app.name')."'",
            "'name' => '".$this->APP_NAME."'",
            $content
        );

        FILe::put(config_path('app.php'), $newContent);

        $this->advanceBar();

        $this->clearCaches();

        return $this;
    }
private function saveConfiguration()
    {
        $this->info("Writing configuration file...");

        // Save in .env file
        $this->env->setEnv(
            [
            'APP_URL' => $this->APP_URL,
            'DB_CONNECTION' => $this->DB_TYPE,
            'DB_HOST' => $this->DB_HOST,
            'DB_PORT' => $this->DB_PORT,
            'DB_DATABASE' => $this->DB_DATABASE,
            'DB_USERNAME' => $this->DB_USERNAME,
            'DB_PASSWORD' => $this->DB_PASSWORD,
            ]
        );

        // save in runtime

        config(['app.url' => $this->APP_URL]);
        config(['app.name' => str_replace(' ', '_', $this->APP_NAME)]);
        config(['database.connections.mysql.driver' => $this->DB_TYPE]);
        config(['database.connections.mysql.host' => $this->DB_HOST]);
        config(['database.connections.mysql.port' => $this->DB_PORT]);
        config(['database.connections.mysql.database' => $this->DB_DATABASE]);
        config(['database.connections.mysql.username' => $this->DB_USERNAME]);
        config(['database.connections.mysql.password' => $this->DB_PASSWORD]);

        // save in app.config
        $content = File::get(config_path('app.php'));
        $newContent = str_replace(
            "'name' => '".config('app.name')."'",
            "'name' => '".$this->APP_NAME."'",
            $content
        );

        FILe::put(config_path('app.php'), $newContent);

        $this->advanceBar();

        $this->clearCaches();

        return $this;
    }
private function saveConfiguration ( ) { $ this -> info ( "Writing configuration file..." ) ; // Save in .env file $ this -> env -> setEnv ( [ 'APP_URL' => $ this -> APP_URL , 'DB_CONNECTION' => $ this -> DB_TYPE , 'DB_HOST' => $ this -> DB_HOST , 'DB_PORT' => $ this -> DB_PORT , 'DB_DATABASE' => $ this -> DB_DATABASE , 'DB_USERNAME' => $ this -> DB_USERNAME , 'DB_PASSWORD' => $ this -> DB_PASSWORD , ] ) ; // save in runtime config ( [ 'app.url' => $ this -> APP_URL ] ) ; config ( [ 'app.name' => str_replace ( ' ' , '_' , $ this -> APP_NAME ) ] ) ; config ( [ 'database.connections.mysql.driver' => $ this -> DB_TYPE ] ) ; config ( [ 'database.connections.mysql.host' => $ this -> DB_HOST ] ) ; config ( [ 'database.connections.mysql.port' => $ this -> DB_PORT ] ) ; config ( [ 'database.connections.mysql.database' => $ this -> DB_DATABASE ] ) ; config ( [ 'database.connections.mysql.username' => $ this -> DB_USERNAME ] ) ; config ( [ 'database.connections.mysql.password' => $ this -> DB_PASSWORD ] ) ; // save in app.config $ content = File :: get ( config_path ( 'app.php' ) ) ; $ newContent = str_replace ( "'name' => '" . config ( 'app.name' ) . "'" , "'name' => '" . $ this -> APP_NAME . "'" , $ content ) ; FILe :: put ( config_path ( 'app.php' ) , $ newContent ) ; $ this -> advanceBar ( ) ; $ this -> clearCaches ( ) ; return $ this ; }
Save configuration in .env file and in config run time.

@return $this
@throws \Exception
Save configuration in . env file and in config run time .