From 9798f6aa7dcf507e7ac7179fc348320e36aa160b Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 29 Jun 2021 16:38:19 +1000 Subject: [PATCH] Change scopeActive to include table --- src/Traits/ScopeActive.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } }