DB_NINJA_LOOKUP]); $lookupAccount = LookupAccount::whereAccountKey($accountKey)->first(); if ($lookupAccount) { $data['lookup_account_id'] = $lookupAccount->id; } else { abort('Lookup account not found for ' . $accountKey); } static::create($data); config(['database.default' => $current]); } }