searchBy = [ 'COMPANY' => 'Company', 'SNKEY' => 'Serverkey', 'CUR_VERSION' => 'Current Version', 'STATUS' => 'Status', 'DATABASETYPE' => 'Database', 'PHP_VERSION_ID' => 'PHP Version' ]; } public function render() { $query = ConfServerLicense::select('ID', 'SNKEY', 'COMPANY', 'STATUS', 'CUR_VERSION', 'DATABASETYPE', 'LICENSEDATE'); if ($this->searchSelected && $this->keyword) { $query->where($this->searchSelected, 'LIKE', '%' . $this->keyword . '%'); } $query->orderBy('ID', 'DESC'); $results = $query->paginate($this->perPage); return view('livewire.pages.server-license.server-license-index', compact('results')); } public function search() { $this->resetPage(); } public function showServerLicenseListForm() { $this->action = 'list'; } public function showServerLicenseAddForm() { $this->action = 'add'; } public function showServerLicenseEditForm($id) { $this->editId = $id; $this->action = 'edit'; // $this->emit('showpatchEditForm'); } public function showDeleteModal($id) { $this->emit('showDeleteModal' ,$id); } public function deleteItem($id) { $serverlicense = ConfServerLicense::where("ID", $id)->first(); $serverlicense->status = 'N'; $serverlicense->save(); $message = "Serverlicense status updated successfully"; $this->message = $message; } }