myLogger = \Config\Services::mylogger(); $this->ticketType = [1 => "Claim-GMC", 2 => "Claim-GPA", 3 => "EDLI", 4 => "GTLI"]; $this->priorityType = [ 1 => "Low", 2 => "Medium", 3 => "High", 4 => "Urgent", 5 => "Emergency", 6 => "Critical" ]; $this->relationshipType = [ "self" => "Self", "spouse" => "Spouse", "son" => "Son", "daughter" => "Daughter", "father" => "Father", "mother" => "Mother", "father-in-law" => "Father-in-Law", "mother-in-law" => "Mother-in-Law" ]; } public function ticketList() { if ($this->request->is('get')) { $data['page_name'] = "Claims"; $data['ticket_type'] = $this->ticketType; $data['claim_status'] = []; $data['client_list'] = []; return $this->loadLayout('ticket_search', $data); } else{ $data['ticket_data'] = $this->ticketSearch(); $html = view('ticket_list', $data); return $this->respond(['status' => true, 'html' => $html], 200); } } public function ticketSearch() { $search_data = $this->request->getPost(); // print_r($search_data); die; $data = [ [ 'id' => 1, 'status' => 'Approved', 'claim_no' => 'CL12345', 'tpa_id' => 'TPA001', 'emp_name' => 'John Doe', 'insurer_name' => 'ABC Insurance', 'client_name' => 'XYZ Corp', 'tat' => '5 Days', ], [ 'id' => 2, 'status' => 'Pending', 'claim_no' => 'CL12346', 'tpa_id' => 'TPA002', 'emp_name' => 'Jane Smith', 'insurer_name' => 'DEF Insurance', 'client_name' => 'LMN Ltd', 'tat' => '3 Days', ], [ 'id' => 3, 'status' => 'Rejected', 'claim_no' => 'CL12347', 'tpa_id' => 'TPA003', 'emp_name' => 'Alice Johnson', 'insurer_name' => 'GHI Insurance', 'client_name' => 'PQR Co', 'tat' => '7 Days', ], ]; return $data; } public function ticket_form() { $data['ticket_form'] = 1; return $this->loadLayout('ticket_form_gmc', $data); } public function view_ticket($ticket_id) { $data = []; return $this->loadLayout('ticket_edit_onbording', $data); } public function createTicket() { } public function updateTicket() { } public function createMailTemplate() { $data = []; return $this->loadLayout('ticket_mail_template', $data); } }