refactor: simplify environment variable deletion logic in booted method
This commit is contained in:
parent
3cc3b4162c
commit
171732dbcf
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
|
||||
$application->environment_variables()
|
||||
->where('key', 'LIKE', 'SERVICE_FQDN_%')
|
||||
->orWhere('key', 'LIKE', 'SERVICE_URL_%')
|
||||
->where(function ($q) {
|
||||
$q->where('key', 'LIKE', 'SERVICE_FQDN_%')
|
||||
->orWhere('key', 'LIKE', 'SERVICE_URL_%');
|
||||
})
|
||||
->delete();
|
||||
|
||||
$application->environment_variables_preview()
|
||||
->where('key', 'LIKE', 'SERVICE_FQDN_%')
|
||||
->orWhere('key', 'LIKE', 'SERVICE_URL_%')
|
||||
->where(function ($q) {
|
||||
$q->where('key', 'LIKE', 'SERVICE_FQDN_%')
|
||||
->orWhere('key', 'LIKE', 'SERVICE_URL_%');
|
||||
})
|
||||
->delete();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue