used qualifyColumn to prefix columns
This commit is contained in:
@ -139,7 +139,7 @@ class Transaction extends Model
|
||||
return $query;
|
||||
}
|
||||
|
||||
return $query->whereIn($this->table . '.type', (array) $types);
|
||||
return $query->whereIn($this->qualifyColumn('type'), (array) $types);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -150,7 +150,7 @@ class Transaction extends Model
|
||||
*/
|
||||
public function scopeIncome($query)
|
||||
{
|
||||
return $query->whereIn($this->table . '.type', (array) $this->getIncomeTypes());
|
||||
return $query->whereIn($this->qualifyColumn('type'), (array) $this->getIncomeTypes());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -161,7 +161,7 @@ class Transaction extends Model
|
||||
*/
|
||||
public function scopeExpense($query)
|
||||
{
|
||||
return $query->whereIn($this->table . '.type', (array) $this->getExpenseTypes());
|
||||
return $query->whereIn($this->qualifyColumn('type'), (array) $this->getExpenseTypes());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user