Skip to content

Commit 0bafaa8

Browse files
[10.x] Fix support for the LARAVEL_STORAGE_PATH env var (#51238) (#51243)
* [10.x] Fix support for the LARAVEL_STORAGE_PATH env var * formatting --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent 236ee6d commit 0bafaa8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Illuminate/Foundation/Application.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,10 @@ public function storagePath($path = '')
535535
return $this->joinPaths($this->storagePath ?: $_ENV['LARAVEL_STORAGE_PATH'], $path);
536536
}
537537

538+
if (isset($_SERVER['LARAVEL_STORAGE_PATH'])) {
539+
return $this->joinPaths($this->storagePath ?: $_SERVER['LARAVEL_STORAGE_PATH'], $path);
540+
}
541+
538542
return $this->joinPaths($this->storagePath ?: $this->basePath('storage'), $path);
539543
}
540544

0 commit comments

Comments
 (0)