芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/vendor/facade/ignition/src/Solutions/UseDefaultValetDbCredentialsSolution.php
ensureLineExists('DB_USERNAME', 'root'); $this->ensureLineExists('DB_PASSWORD', ''); } protected function ensureLineExists(string $key, string $value) { $envPath = base_path('.env'); $envLines = array_map(function (string $envLine) use ($value, $key) { return Str::startsWith($envLine, $key) ? "{$key}={$value}".PHP_EOL : $envLine; }, file($envPath)); file_put_contents($envPath, implode('', $envLines)); } public function getDocumentationLinks(): array { return []; } public function getRunParameters(): array { return [ 'Valet documentation' => 'https://laravel.com/docs/master/valet', ]; } public function getSolutionDescription(): string { return 'You seem to be using Valet, but the .env file does not contain the right default database credentials.'; } }