$apiKey = array(); // $dataJSON = array(); $headers = $app->request->headers->all(); verifyHeaders(array('Key')); // $phone = $headers["Email"] ; // reading request params $apiKey = $headers['Key']; // echo json_encode($headers); $request['apiKey'] = $apiKey; // $request['email'] = $phone ; $request['restaurantID'] = $id; $request['empid'] = $id2; $controller = new ApiController(); // Call controller function //echo json_encode($request) ; $response = $controller->resetEmp($request); // echo json response echoRespnse(200, $response); }); //////////////////////////////ORDER APIs///////////////////////////////////////// $app->get('/merchant/:id/order/:id2/products', function ($id, $id2) use($app) { // check for required params $request = array(); $response = array(); $apiKey = array(); $headers = $app->request->headers->all(); verifyHeaders(array('Key')); // reading request params $apiKey = $headers['Key']; $request['apiKey'] = $apiKey; $request['restaurantID'] = $id;