Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@
*/
'namespace' => 'Modules',

/*
|--------------------------------------------------------------------------
| Vapor Maintenance Mode
|--------------------------------------------------------------------------
|
| Indicates if the application is running on Laravel Vapor.
| When enabled, cached services path will be set to a writable location.
|
*/
'vapor_maintenance_mode' => env('VAPOR_MAINTENANCE_MODE', false),

/*
|--------------------------------------------------------------------------
| Module Stubs
Expand Down
2 changes: 1 addition & 1 deletion src/Laravel/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function getCachedServicesPath(): string
{
// This checks if we are running on a Laravel Vapor managed instance
// and sets the path to a writable one (services path is not on a writable storage in Vapor).
if (! is_null(env('VAPOR_MAINTENANCE_MODE', null))) {
if (config('modules.vapor_maintenance_mode')) {
return Str::replaceLast('config.php', $this->getSnakeName().'_module.php', $this->app->getCachedConfigPath());
}

Expand Down
Loading