diff --git a/app/Models/Study.php b/app/Models/Study.php index a315912..1cef46b 100644 --- a/app/Models/Study.php +++ b/app/Models/Study.php @@ -40,4 +40,19 @@ public function shares(): HasMany { return $this->hasMany(SharedStudy::class); } + + public function scopeActive($query) + { + return $query->where('is_archived', false); + } + + public function scopeArchived($query) + { + return $query->where('is_archived', true); + } + + public function scopeUnlocked($query) + { + return $query->where('is_locked', false); + } }