This commit is contained in:
Masroor Ehsan 2024-12-30 22:47:32 +06:00
parent 414d66e5d7
commit 3437f16d82

View File

@ -40,4 +40,19 @@ public function shares(): HasMany
{ {
return $this->hasMany(SharedStudy::class); 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);
}
} }