original_string: public function update()
      {
          $firstUp = !Schema::hasTable($this->getMigrationTableName());
          if ($firstUp) {
              $this->repository->createRepository();
              $this->note('Migration table created');
          }
  
          /*
           * Update modules
           */
          $modules = Config::get('cms.loadModules', []);
          foreach ($modules as $module) {
              $this->migrateModule($module);
          }
  
          /*
           * Update plugins
           */
          $plugins = $this->pluginManager->sortByDependencies();
          foreach ($plugins as $plugin) {
              $this->updatePlugin($plugin);
          }
  
          Parameter::set('system::update.count', 0);
          CacheHelper::clear();
  
          /*
           * Seed modules
           */
          if ($firstUp) {
              $modules = Config::get('cms.loadModules', []);
              foreach ($modules as $module) {
                  $this->seedModule($module);
              }
          }
  
          return $this;
      }
code: public function update()
      {
          $firstUp = !Schema::hasTable($this->getMigrationTableName());
          if ($firstUp) {
              $this->repository->createRepository();
              $this->note('Migration table created');
          }
  
          /*
           * Update modules
           */
          $modules = Config::get('cms.loadModules', []);
          foreach ($modules as $module) {
              $this->migrateModule($module);
          }
  
          /*
           * Update plugins
           */
          $plugins = $this->pluginManager->sortByDependencies();
          foreach ($plugins as $plugin) {
              $this->updatePlugin($plugin);
          }
  
          Parameter::set('system::update.count', 0);
          CacheHelper::clear();
  
          /*
           * Seed modules
           */
          if ($firstUp) {
              $modules = Config::get('cms.loadModules', []);
              foreach ($modules as $module) {
                  $this->seedModule($module);
              }
          }
  
          return $this;
      }
code_tokens: public function update ( ) { $ firstUp = ! Schema :: hasTable ( $ this -> getMigrationTableName ( ) ) ; if ( $ firstUp ) { $ this -> repository -> createRepository ( ) ; $ this -> note ( 'Migration table created' ) ; } /*
           * Update modules
           */ $ modules = Config :: get ( 'cms.loadModules' , [ ] ) ; foreach ( $ modules as $ module ) { $ this -> migrateModule ( $ module ) ; } /*
           * Update plugins
           */ $ plugins = $ this -> pluginManager -> sortByDependencies ( ) ; foreach ( $ plugins as $ plugin ) { $ this -> updatePlugin ( $ plugin ) ; } Parameter :: set ( 'system::update.count' , 0 ) ; CacheHelper :: clear ( ) ; /*
           * Seed modules
           */ if ( $ firstUp ) { $ modules = Config :: get ( 'cms.loadModules' , [ ] ) ; foreach ( $ modules as $ module ) { $ this -> seedModule ( $ module ) ; } } return $ this ; }
docstring: Creates the migration table and updates
  @return self
docstring_tokens: Creates the migration table and updates