diff --git a/app/sprinkles/core/src/Database/Models/Model.php b/app/sprinkles/core/src/Database/Models/Model.php index 987ae9139..38a83610c 100644 --- a/app/sprinkles/core/src/Database/Models/Model.php +++ b/app/sprinkles/core/src/Database/Models/Model.php @@ -70,8 +70,8 @@ public static function findUnique($value, $identifier, $checkDeleted = true) { $query = static::whereRaw("LOWER($identifier) = ?", [mb_strtolower($value)]); - if ($checkDeleted && method_exists($query, 'withTrashed')) { - $query = $query->withTrashed(); + if ($checkDeleted && $query->hasMacro('withTrashed')) { + $query = $query->withTrashed(); } return $query->first();