code: public static function encodeId($id, $salt, $hashLength = self::MIN_HASH_LENGTH)
      {
          $hashIds = new Hashids($salt, $hashLength);
          return $hashIds->encode($id);
      }
docs: Encodes an id into an hash
  @author Adegoke Obasa <goke@cottacush.com>
  @param $id
  @param $salt
  @param int $hashLength
  @return string
  @throws \Exception