Grate the potatoes and onions on a fine grater. Squeeze the grated potatoes, combine them with the onions, eggs, cheese and garlic. Salt, pepper and mix well. Add flour and mix again.
Place the potato mixture in a frying pan with well-heated vegetable oil using a tablespoon in the form of pancakes. Fry the potato pancakes on medium heat on both sides until golden brown.
Serve the finished potato pancakes hot.