original_string: public function register()
      {
          foreach ($this->modules as $module)
          {
              $module->register();
          }
          $modules = ModuleModel::where('module_status', 1)->get();
  
          foreach ($modules as $module)
          {
              if ($module->module_is_installed)
              {
                  $this->app['events']->fire('modules.install.'.$module->module_name, null);
                  $module->module_is_installed = 0;
              }
              if ($module->module_is_updated)
              {
                  $this->app['events']->fire('modules.update.'.$module->module_name, null);
                  $module->module_is_updated = 0;
              }
              if ($module->module_is_enabled)
              {
                  $this->app['events']->fire('modules.enable.'.$module->module_name, null);
                  $module->module_is_enabled = 0;
              }
              $module->save();
          }
      }
code: public function register()
      {
          foreach ($this->modules as $module)
          {
              $module->register();
          }
          $modules = ModuleModel::where('module_status', 1)->get();
  
          foreach ($modules as $module)
          {
              if ($module->module_is_installed)
              {
                  $this->app['events']->fire('modules.install.'.$module->module_name, null);
                  $module->module_is_installed = 0;
              }
              if ($module->module_is_updated)
              {
                  $this->app['events']->fire('modules.update.'.$module->module_name, null);
                  $module->module_is_updated = 0;
              }
              if ($module->module_is_enabled)
              {
                  $this->app['events']->fire('modules.enable.'.$module->module_name, null);
                  $module->module_is_enabled = 0;
              }
              $module->save();
          }
      }
code_tokens: public function register ( ) { foreach ( $ this -> modules as $ module ) { $ module -> register ( ) ; } $ modules = ModuleModel :: where ( 'module_status' , 1 ) -> get ( ) ; foreach ( $ modules as $ module ) { if ( $ module -> module_is_installed ) { $ this -> app [ 'events' ] -> fire ( 'modules.install.' . $ module -> module_name , null ) ; $ module -> module_is_installed = 0 ; } if ( $ module -> module_is_updated ) { $ this -> app [ 'events' ] -> fire ( 'modules.update.' . $ module -> module_name , null ) ; $ module -> module_is_updated = 0 ; } if ( $ module -> module_is_enabled ) { $ this -> app [ 'events' ] -> fire ( 'modules.enable.' . $ module -> module_name , null ) ; $ module -> module_is_enabled = 0 ; } $ module -> save ( ) ; } }
docstring: Register modules with Moduel class
  
  @return void
docstring_tokens: Register modules with Moduel class