Multi-db support
This commit is contained in:
parent
ba90b3bcea
commit
eae2fca3a5
1 changed files with 10 additions and 8 deletions
|
|
@ -73,14 +73,16 @@ class InitLookup extends Command
|
|||
|
||||
$this->info($this->log);
|
||||
|
||||
if ($this->option('validate') && $errorEmail) {
|
||||
Mail::raw($this->log, function ($message) use ($errorEmail, $database) {
|
||||
$message->to($errorEmail)
|
||||
->from(CONTACT_EMAIL)
|
||||
->subject("Check-Lookups [{$database}]: " . strtoupper($this->isValid ? RESULT_SUCCESS : RESULT_FAILURE));
|
||||
});
|
||||
} elseif (! $this->isValid) {
|
||||
throw new Exception('Check data failed!!');
|
||||
if ($this->option('validate')) {
|
||||
if ($errorEmail = env('ERROR_EMAIL')) {
|
||||
Mail::raw($this->log, function ($message) use ($errorEmail, $database) {
|
||||
$message->to($errorEmail)
|
||||
->from(CONTACT_EMAIL)
|
||||
->subject("Check-Lookups [{$database}]: " . strtoupper($this->isValid ? RESULT_SUCCESS : RESULT_FAILURE));
|
||||
});
|
||||
} elseif (! $this->isValid) {
|
||||
throw new Exception('Check lookups failed!!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue