DB_NINJA_LOOKUP]); $lookupAccount = LookupAccount::whereAccountKey($accountKey) ->firstOrFail(); $lookupUser = LookupUser::whereLookupAccountId($lookupAccount->id) ->whereUserId($userId) ->firstOrFail(); $lookupUser->email = $email; $lookupUser->confirmation_code = $confirmationCode; $lookupUser->save(); config(['database.default' => $current]); } }