Skip to content

Commit a8e387c

Browse files
authored
Solve isRelationExists causing potential ambiguous errors by not specifying table name
1 parent ea4fc51 commit a8e387c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Interaction.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static function isRelationExists(Model $model, $relation, $target, $class
6767
$target = self::formatTargets($target, $class ?: config('auth.providers.users.model'), $updates);
6868

6969
return $model->{$relation}($target->classname)
70-
->where($class ? 'subject_id' : 'user_id', head($target->ids))
70+
->where($class ? config('acquaintances.tables.interactions', 'interactions') . '.subject_id' : config('acquaintances.tables.interactions', 'interactions') . '.user_id', head($target->ids))
7171
->exists();
7272
}
7373

@@ -216,8 +216,8 @@ static public function numberToReadable($number, $precision = 1, $divisors = nul
216216

217217
return number_format($number / $divisor, $precision).$shorthand;
218218
}
219-
220-
219+
220+
221221

222222
public static function getFullModelName($modelClassName)
223223
{

0 commit comments

Comments
 (0)