original_string: protected function refreshApplication(Foundation $foundation, Memory $memory): void
      {
          if (! $foundation->installed()) {
              $this->error('Abort as application is not installed!');
  
              return;
          }
  
          $this->call('extension:detect', ['--quiet' => true]);
  
          try {
              Collection::make($memory->get('extensions.active', []))
                  ->keys()->each(function ($extension) {
                      $options = ['name' => $extension, '--force' => true];
  
                      $this->call('extension:refresh', $options);
                      $this->call('extension:update', $options);
                  });
  
              $this->laravel->make('orchestra.extension.provider')->writeFreshManifest();
          } catch (PDOException $e) {
              // Skip if application is unable to make connection to the database.
          }
      }
code: protected function refreshApplication(Foundation $foundation, Memory $memory): void
      {
          if (! $foundation->installed()) {
              $this->error('Abort as application is not installed!');
  
              return;
          }
  
          $this->call('extension:detect', ['--quiet' => true]);
  
          try {
              Collection::make($memory->get('extensions.active', []))
                  ->keys()->each(function ($extension) {
                      $options = ['name' => $extension, '--force' => true];
  
                      $this->call('extension:refresh', $options);
                      $this->call('extension:update', $options);
                  });
  
              $this->laravel->make('orchestra.extension.provider')->writeFreshManifest();
          } catch (PDOException $e) {
              // Skip if application is unable to make connection to the database.
          }
      }
code_tokens: protected function refreshApplication ( Foundation $ foundation , Memory $ memory ) : void { if ( ! $ foundation -> installed ( ) ) { $ this -> error ( 'Abort as application is not installed!' ) ; return ; } $ this -> call ( 'extension:detect' , [ '--quiet' => true ] ) ; try { Collection :: make ( $ memory -> get ( 'extensions.active' , [ ] ) ) -> keys ( ) -> each ( function ( $ extension ) { $ options = [ 'name' => $ extension , '--force' => true ] ; $ this -> call ( 'extension:refresh' , $ options ) ; $ this -> call ( 'extension:update' , $ options ) ; } ) ; $ this -> laravel -> make ( 'orchestra.extension.provider' ) -> writeFreshManifest ( ) ; } catch ( PDOException $ e ) { // Skip if application is unable to make connection to the database. } }
docstring: Refresh application for Orchestra Platform.
  
  @param  \Orchestra\Contracts\Foundation\Foundation  $foundation
  @param  \Orchestra\Contracts\Memory\Provider  $memory
  
  @return void
docstring_tokens: Refresh application for Orchestra Platform .