Skip to content

Commit e07f101

Browse files
authored
Merge pull request #2144 from nWidart/remove-env-from-being-used
use config instead of env for Vapor maintenance mode check
2 parents ca0bf63 + dff2ad8 commit e07f101

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

config/config.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515
*/
1616
'namespace' => 'Modules',
1717

18+
/*
19+
|--------------------------------------------------------------------------
20+
| Vapor Maintenance Mode
21+
|--------------------------------------------------------------------------
22+
|
23+
| Indicates if the application is running on Laravel Vapor.
24+
| When enabled, cached services path will be set to a writable location.
25+
|
26+
*/
27+
'vapor_maintenance_mode' => env('VAPOR_MAINTENANCE_MODE', false),
28+
1829
/*
1930
|--------------------------------------------------------------------------
2031
| Module Stubs

src/Laravel/Module.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function getCachedServicesPath(): string
1717
{
1818
// This checks if we are running on a Laravel Vapor managed instance
1919
// and sets the path to a writable one (services path is not on a writable storage in Vapor).
20-
if (! is_null(env('VAPOR_MAINTENANCE_MODE', null))) {
20+
if (config('modules.vapor_maintenance_mode')) {
2121
return Str::replaceLast('config.php', $this->getSnakeName().'_module.php', $this->app->getCachedConfigPath());
2222
}
2323

0 commit comments

Comments
 (0)