environment('local'); } public static function markInstalled(): void { file_put_contents(storage_path('.installed'), date(DATE_ATOM)); } /** * Frisch hochgeladene Installation: .env aus der Vorlage anlegen und einen * Anwendungsschlüssel erzeugen – ohne Schlüssel funktionieren weder Sitzungen * noch Cookies, also auch der Installer nicht. */ public static function prepareEnvironment(): void { $env = app()->environmentFilePath(); if (! is_file($env) && is_file(base_path('.env.example')) && is_writable(base_path())) { $key = 'base64:'.base64_encode(Encrypter::generateKey(config('app.cipher', 'AES-256-CBC'))); copy(base_path('.env.example'), $env); EnvFile::set($env, [ 'APP_KEY' => $key, 'APP_ENV' => 'production', 'APP_DEBUG' => 'false', ]); config(['app.key' => $key, 'app.env' => 'production', 'app.debug' => false]); } } }