searchBy = [ 'PID' => 'PID', 'PATCHNAME' => 'Patch Name', 'PDESC' => 'Description', 'MAJOR_VERSION' => 'Major Vaersion', 'Remark' => 'Remark' ]; $this->selectedPatches = []; $this->dispatchBrowserEvent('grandchild-component-loaded'); } public function search() { $this->resetPage(); } public function showMultiPatchList() { $this->render(); } public function loadPage($page) { $this->emit('menuChanged', $page); } public function render() { // dd("dd"); $query = ConfSmartUpdate::select('PID', 'PATCHNAME', 'PDESC', 'PDATE', 'PLEVEL', 'Remark', 'MAJOR_VERSION'); if ($this->searchSelected && $this->keyword) { $query->where($this->searchSelected, 'LIKE', '%' . $this->keyword . '%'); } $query->orderBy('PID', 'DESC'); $results = $query->paginate($this->perPage); return view('livewire.pages.send-patch.send-multi-patch-list', [ 'results' => $results, 'selectedPatches' => ConfSmartUpdate::whereIn('PID', $this->selectedPatches)->get() ]); } }