GWM
This commit is contained in:
parent
ca56be21b6
commit
bf6a914ded
@ -41,6 +41,7 @@ $routes->group('api', ['filter' => 'appSignature'], function ($routes) {
|
||||
|
||||
//Agent
|
||||
$routes->get('agent/agentList', 'AgentController::agentList');
|
||||
$routes->get('agent/agentListForEnquiryCreationDropdown', 'AgentController::agentListForEnquiryCreationDropdown');
|
||||
$routes->get('agent/findAgent', 'AgentController::findAgent');
|
||||
$routes->post('agent/createAgent', 'AgentController::createAgent');
|
||||
$routes->post('agent/updateAgent', 'AgentController::updateAgent');
|
||||
|
||||
@ -34,6 +34,22 @@ class AgentController extends ResourceController
|
||||
|
||||
}
|
||||
|
||||
public function agentListForEnquiryCreationDropdown()
|
||||
{
|
||||
try{
|
||||
|
||||
$id = $this->request->getGet('manager_id');
|
||||
|
||||
$data = $this->AgentModel->where('manager_id' , $id )->where('is_active',1)->findAll();
|
||||
|
||||
return $this->respond(['status' => 'success', 'code' => 200, 'data' => $data], 200);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->respond(['status' => 'failed', 'code' => 500, 'data' => $e->getMessage()], 500);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Find a agent
|
||||
public function findAgent()
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user