refactor: simplify environment variable deletion logic in booted method
This commit is contained in:
parent
14ddf2fab1
commit
ebb2f0cc7d
1 changed files with 8 additions and 5 deletions
|
|
@ -188,13 +188,16 @@ protected static function booted()
|
||||||
|
|
||||||
// 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue