/** * Set language to environement file. * * @param string $language */ protected function setLanguageToEnv($language) { env_replace('APP_LOCALE', $language); }
private function rewriteEnv($newValues) { foreach ($newValues as $key => $value) { env_replace($key, $value); } $this->reloadConfig($newValues); }
/** * set a new active Theme. * * @param string $theme * * @return bool */ public function setActive($theme) { if (!$this->exists($theme)) { throw new Exception("Theme {$theme} doesn't exist!"); } umask(0); $this->cleanActiveTheme(); $themePath = base_path('themes' . DIRECTORY_SEPARATOR . $theme); @symlink($themePath . '/task.js', base_path('tasks/frontend.js')); @symlink($themePath . '/widgets', base_path('widgets/Frontend/Theme')); env_replace('APP_FRONTEND_THEME', $theme); $this->saveThemePartials(); if (Template::all()->isEmpty()) { TemplateHelper::saveTemplates($theme); } Artisan::call('theme:publish', ['--force' => true]); }