Preheat oven to 180 and grease your casserole dish. Place a layer of potatoes and onion on the bottom, and sprinkle liberally with the garlic, salt, and, pepper Sprinkle over a layer of cheese.
Repeat these layers until you have run out of potatoes and onion – leave some cheese for the top.
Pour over the cream and top with the remaining cheese.
Bake at 180-200C for 1 hour until potatoes are soft and sauce has reduced and thickened. Cover with foil if the top is getting too brown.