diff --git a/src/Env.php b/src/Env.php index 5f6739c..cfcef91 100644 --- a/src/Env.php +++ b/src/Env.php @@ -20,6 +20,8 @@ public function get(string $key): string { $value = Str::of($this->env_file_content)->match("/^$key=(.*)$/m"); + $value = trim($value); + if (Str::of($value)->startsWith('"')) $value = Str::of($value)->substr(1); if (Str::of($value)->endsWith('"')) $value = Str::of($value)->substr(0, -1); @@ -51,4 +53,4 @@ private function loadEnvContent() { $this->env_file_content = File::get(base_path($this->env_file)); } -} \ No newline at end of file +}