We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90d86cc commit e127a70Copy full SHA for e127a70
src/Scopes/TicketScope.php
@@ -87,4 +87,20 @@ public function scopeWithHighPriority(Builder $builder): Builder
87
{
88
return $builder->where('priority', Priority::HIGH->value);
89
}
90
+
91
+ /**
92
+ * Get archived tickets
93
+ */
94
+ public function scopeArchived(Builder $builder): Builder
95
+ {
96
+ return $builder->where('status', Status::ARCHIVED->value);
97
+ }
98
99
100
+ * Get unarchived tickets
101
102
+ public function scopeUnArchived(Builder $builder): Builder
103
104
+ return $builder->whereNot('status', Status::ARCHIVED->value);
105
106
0 commit comments