['except' => ''], ]; public function render() { $threads = []; if ($this->search) { $threads = ForumThread::search($this->search)->get(); } elseif ($this->category) { $threads = ForumThread::where('category_id', '=', $this->category->id)->orderBy('updated_at', 'desc')->get(); } else { $threads = ForumThread::orderBy('updated_at', 'desc')->get(); } return view('livewire.forum.threads')->with('threads', paginate($threads, 10)); } }