refactor: simplify environment variable deletion logic in booted method

This commit is contained in:
Andras Bacsai committed 2025-11-18 10:29:08 +01:00
1 parent 14ddf2fab1
commit ebb2f0cc7d
1 file changed
+8 -5
+8 -5
View File
@@ -188,13 +188,16 @@ class Application extends BaseModel
// Remove SERVICE_FQDN_* and SERVICE_URL_* environment variables // Remove SERVICE_FQDN_* and SERVICE_URL_* environment variables
$application->environment_variables() $application->environment_variables()
->where('key', 'LIKE', 'SERVICE_FQDN_%') ->where(function ($q) {
->orWhere('key', 'LIKE', 'SERVICE_URL_%') $q->where('key', 'LIKE', 'SERVICE_FQDN_%')
->orWhere('key', 'LIKE', 'SERVICE_URL_%');
})
->delete(); ->delete();
$application->environment_variables_preview() $application->environment_variables_preview()
->where('key', 'LIKE', 'SERVICE_FQDN_%') ->where(function ($q) {
->orWhere('key', 'LIKE', 'SERVICE_URL_%') $q->where('key', 'LIKE', 'SERVICE_FQDN_%')
->orWhere('key', 'LIKE', 'SERVICE_URL_%');
})
->delete(); ->delete();
} }