public function onClearCache() { CacheClear::fireInternal(); Flash::success(Lang::get('rainlab.translate::lang.messages.clear_cache_success')); }
/** * Creates the migration table and updates * @return self */ public function update() { $firstUp = !Schema::hasTable('migrations'); if ($firstUp) { $this->repository->createRepository(); $this->note('Migration table created successfully.'); } /* * 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); } Parameters::set('system::update.count', 0); CacheClear::fireInternal(); /* * Seed modules */ if ($firstUp) { $modules = Config::get('cms.loadModules', []); foreach ($modules as $module) { $this->seedModule($module); } } return $this; }