diff --git a/src/Traits/ScopeActive.php b/src/Traits/ScopeActive.php index e4583f4..83249c1 100644 --- a/src/Traits/ScopeActive.php +++ b/src/Traits/ScopeActive.php @@ -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); } }