This commit is contained in:
Obi-Wana
2021-09-07 10:41:29 +02:00
committed by GitHub
parent 2619befb99
commit 5c59efb8b1
+1 -1
View File
@@ -71,7 +71,7 @@ class TicketSearch extends Component
->with(['user', 'category', 'priority'])
->where('user_id', '=', $this->user->id)
->when($this->show === false, fn ($query) => $query->whereNull('closed_at'))
->when($this->show, fn ($query) => $query->whereNotNull('closed_at')->orWhereNull('closed_at'))
->when($this->show, fn ($query) => $query->whereNotNull('closed_at'))
->when($this->search, fn ($query) => $query->where('subject', 'LIKE', '%'.$this->search.'%'))
->orderBy($this->sortField, $this->sortDirection)
->paginate($this->perPage);