From 4337eab13eb0ee1eb7ab13761201d0815e0f250b Mon Sep 17 00:00:00 2001 From: denisdulici Date: Sat, 22 Feb 2020 00:30:45 +0300 Subject: [PATCH] fixed ambiguous type --- app/Models/Banking/Transaction.php | 2 +- app/Models/Common/Contact.php | 2 +- app/Models/Setting/Category.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/Banking/Transaction.php b/app/Models/Banking/Transaction.php index 0c235c92d..ffd3395a0 100644 --- a/app/Models/Banking/Transaction.php +++ b/app/Models/Banking/Transaction.php @@ -93,7 +93,7 @@ class Transaction extends Model return $query; } - return $query->whereIn('type', (array) $types); + return $query->whereIn($this->table . '.type', (array) $types); } /** diff --git a/app/Models/Common/Contact.php b/app/Models/Common/Contact.php index f89527060..109762bf6 100644 --- a/app/Models/Common/Contact.php +++ b/app/Models/Common/Contact.php @@ -76,7 +76,7 @@ class Contact extends Model return $query; } - return $query->whereIn('type', (array) $types); + return $query->whereIn($this->table . '.type', (array) $types); } public function scopeEmail($query, $email) diff --git a/app/Models/Setting/Category.php b/app/Models/Setting/Category.php index 3c8341222..9d93ca0d9 100644 --- a/app/Models/Setting/Category.php +++ b/app/Models/Setting/Category.php @@ -65,7 +65,7 @@ class Category extends Model return $query; } - return $query->whereIn('type', (array) $types); + return $query->whereIn($this->table . '.type', (array) $types); } public function scopeName($query, $name)