searchBy = [ 'PID' => 'PID', 'PATCHNAME' => 'Patch Name', 'PDESC' => 'Description', 'MAJOR_VERSION' => 'Major Vaersion', 'Remark' => 'Remark' ]; } public function render() { $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.patch.patch-index', compact('results')); } public function search() { $this->resetPage(); } public function showpatchListForm() { $this->action = 'list'; } public function showpatchAddForm() { $this->action = 'add'; } public function showpatchEditForm($pid) { $this->editPid = $pid; $this->action = 'edit'; // $this->emit('showpatchEditForm'); } public function deleteItem($pid) { $pathFile = TabPatchFile::where("ptid", $pid)->delete(); $patch = ConfSmartUpdate::where("PID", $pid)->delete(); $message = "Deleted Patch ID : " . json_encode($pid) . " Successfully"; $this->message = $message; } }