Change scopeActive to include table
This commit is contained in:
parent
d4824ecda5
commit
9798f6aa7d
@ -10,8 +10,8 @@ trait ScopeActive
|
||||
/**
|
||||
* Only query active records
|
||||
*/
|
||||
public function scopeActive()
|
||||
public function scopeActive($query)
|
||||
{
|
||||
return $this->where('active',TRUE);
|
||||
return $query->where($this->getTable().'.active',TRUE);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user