Skip to content
Open
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
9 changes: 5 additions & 4 deletions ProcessMaker/Multitenancy/SwitchTenant.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public function makeCurrent(IsTenant $tenant): void
return new TenantAwareBroadcastManager($app, $tenant->id);
});

// Setup tenant-specific route cache. This is needed for plugins.
if ($app->routesAreCached()) {
Env::getRepository()->set('APP_ROUTES_CACHE', storage_path('routes-v7.php'));
}
// Configure the tenant-specific route cache before Laravel checks whether it
// exists. This lets `TENANT=<id> php artisan route:cache` create the cache
// for a tenant that does not have one yet.
Env::getRepository()->set('APP_ROUTES_CACHE', storage_path('routes-v7.php'));
}

/**
Expand All @@ -61,6 +61,7 @@ public function forgetCurrent(): void
{
$app = app();
$app->useStoragePath(base_path('storage'));
Env::getRepository()->clear('APP_ROUTES_CACHE');

$this->setConfig('logging.channels.daily.path', storage_path('logs/processmaker.log'));
$app->make('log')->reset();
Expand Down
Loading