async index(req, res, next) {
    try {
      const company = await knex('company');

      return res.json(company);
    } catch (error) {
      next(error);
    }
  }
/**
   * this function does the get method control
   * @summary this function takes all the companies, and returns in json format.
   * @param {Express} res - this para is responsible for returning the answer (response)
   * @param {Express} next - this parameter is responsible for when an error occurs, or ecession it is called, by default, in this case it is used here to return the error
   * @return {json} returns json object containing all companies
   */
this function does the get method control
@summary this function takes all the companies, and returns in json format.
@param {Express} res - this para is responsible for returning the answer (response)
@param {Express} next - this parameter is responsible for when an error occurs, or ecession it is called, by default, in this case it is used here to return the error
@return {json} returns json object containing all companies
this function does the get method control @summary this function takes all the companies and returns in json format . @param { Express } res - this para is responsible for returning the answer ( response ) @param { Express } next - this parameter is responsible for when an error occurs or ecession it is called by default in this case it is used here to return the error @return { json } returns json object containing all companies
async index(req, res, next) {
    try {
      const company = await knex('company');
      return res.json(company);
    } catch (error) {
      next(error);
    }
  }
async index ( req , res , next ) { try { const company = await knex ( 'company' ) ; return res . json ( company ) ; } catch ( error ) { next ( error ) ; } }
this function does the get method control
 @summary this function takes all the companies, and returns in json format.
this function does the get method control @summary this function takes all the companies and returns in json format .