Multi-db fix

This commit is contained in:
Hillel Coren 2017-07-12 19:51:15 +03:00
parent 04aa4920d0
commit 756fca49fe

View File

@ -87,9 +87,13 @@ class LookupModel extends Eloquent
$providerId = substr($value, 0, 1); $providerId = substr($value, 0, 1);
$oauthId = substr($value, 2); $oauthId = substr($value, 2);
$isFound = $entity::where('oauth_provider_id', '=', $providerId) $isFound = $entity::where('oauth_provider_id', '=', $providerId)
->where('oauth_user_id', '=', $oauthId)->first(); ->where('oauth_user_id', '=', $oauthId)
->withTrashed()
->first();
} else { } else {
$isFound = $entity::where($field, '=', $value)->first(); $isFound = $entity::where($field, '=', $value)
->withTrashed()
->first();
} }
if (! $isFound) { if (! $isFound) {
abort("Looked up {$className} not found: {$field} => {$value}"); abort("Looked up {$className} not found: {$field} => {$value}");