Change scopeActive to include table

This commit is contained in:
Deon George 2021-06-29 16:38:19 +10:00
parent d4824ecda5
commit 9798f6aa7d
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254

View File

@ -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);
}
}