Skip to content

Commit

Permalink
Merge pull request #6 from marcogermani87/patch-1
Browse files Browse the repository at this point in the history
Update Env.php
  • Loading branch information
syamsoul authored Aug 25, 2024
2 parents 4c63b6d + 0407fa1 commit d464f6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -51,4 +53,4 @@ private function loadEnvContent()
{
$this->env_file_content = File::get(base_path($this->env_file));
}
}
}

0 comments on commit d464f6f

Please sign in to comment.