used qualifyColumn to prefix columns

This commit is contained in:
Denis Duliçi
2021-09-10 09:41:15 +03:00
parent f77b6475ff
commit 91907067a2
14 changed files with 50 additions and 50 deletions

View File

@ -133,7 +133,7 @@ class Contact extends Model
return $query;
}
return $query->whereIn($this->table . '.type', (array) $types);
return $query->whereIn($this->qualifyColumn('type'), (array) $types);
}
/**
@ -144,7 +144,7 @@ class Contact extends Model
*/
public function scopeVendor($query)
{
return $query->whereIn($this->table . '.type', (array) $this->getVendorTypes());
return $query->whereIn($this->qualifyColumn('type'), (array) $this->getVendorTypes());
}
/**
@ -155,7 +155,7 @@ class Contact extends Model
*/
public function scopeCustomer($query)
{
return $query->whereIn($this->table . '.type', (array) $this->getCustomerTypes());
return $query->whereIn($this->qualifyColumn('type'), (array) $this->getCustomerTypes());
}
public function scopeEmail($query, $email)