Skip to content

Commit

Permalink
[10.x] Fix support for the LARAVEL_STORAGE_PATH env var (#51238) (#51243
Browse files Browse the repository at this point in the history
)

* [10.x] Fix support for the LARAVEL_STORAGE_PATH env var

* formatting

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
dunglas and taylorotwell committed Apr 29, 2024
1 parent 236ee6d commit 0bafaa8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,10 @@ public function storagePath($path = '')
return $this->joinPaths($this->storagePath ?: $_ENV['LARAVEL_STORAGE_PATH'], $path);
}

if (isset($_SERVER['LARAVEL_STORAGE_PATH'])) {
return $this->joinPaths($this->storagePath ?: $_SERVER['LARAVEL_STORAGE_PATH'], $path);
}

return $this->joinPaths($this->storagePath ?: $this->basePath('storage'), $path);
}

Expand Down

0 comments on commit 0bafaa8

Please sign in to comment.