I haven't had this in a while, but thought I'd do a round-up post with all my remedies (and some actually work!).
PREVENTIONS
1. Exclude predators! Can't get around this one. You may need to shift the nestboxes to a safe zone and coop the chickens in this until laying time is over. Another option is to move the nestboxes close to a spot where you or your dog can keep an eye on things (if it's goannas). But frankly the only way I've defeated goannas is to coop the chickens in a secure pen until laying is finished for the day.
2. Harden eggshells. Feed extra calcium, maybe worm the birds (heavy worm burdens reduce nutrient absorption), make sure water is always clean (algae and germy water will also affect nutrient absorption), and make sure chickens aren't kept too dark, as vitamin D (from sunlight) is necessary for the absorption of calcium. You can give cod liver oil if you feel vitamin D needs an increase and there's no easy way to expose the birds to more light.
3. Increase protein *if it's deficient*. Some diets may be low in methionine, which can lead to cannibalism and egg eating. Standard layer feeds should not be low in protein, but if you dilute the feed with scraps without making sure the scraps are high enough in protein, the bird may gradually develop a deficiency.
4. Darken and raise nestboxes. If a rooster persistently gets in the nestbox to check it out for hens, you need to get the nest away from his immediate view.
CURING EGG EATERS
A common suggestion with ingrained egg eaters is to blow out an egg and fill it with mustard or chilli. Frankly this doesn't work, or doesn't work often enough to justify the effort. Chilli doesn't work because birds don't taste heat, and to be honest mustard only puts them off briefly.
Putting golf balls in a nestbox isn't a bad idea, but it doesn't really stop the problem of hens associating one another's 'I've just laid' squawk with food. That's the real habit you need to break, because as soon as a hen makes her laying noise, the others will know there's a fresh egg ready to be smashed.
Using a 'roll nest' isn't a bad idea, but I've found that a determined hen will simply reach into the egg compartment. However you will certainly cut the number of egg losses if you use a roll nest. By the way, I've made ordinary nestboxes into roll nests by simply raising the rear on about a 10 degree slope, and installing a little shelf at the front for eggs to roll under. However you can't use nesting litter with roll nests, and often hens refuse to go inside.
The best solution is one that comes from understanding how chickens go about eating their eggs. They either try to stomp on the eggs; or they corner them against the nestbox side before using their beak. Some will roll the egg up out of the nestbox and try to smash it on the floor.
The best way to break an ingrained habit is, funnily enough, to make sure hens can easily get at the eggs, but make it much harder for those eggs to be broken. Since they usually need a nestbox to break eggs (or something else to break it against, like the floor when dropped), the answer is to *remove the nestboxes* and leave a completely plain open floor for laying.
The hens (and/or rooster) will try again and again to break those first eggs, but with nothing to corner them against (except the shed corners -- but most times eggs will be laid in the middle of the floor) the eggs will simply roll. This is also dependent on hard eggshells, but if eggshells are solid, then while you may get chips in the end of each egg, you're very unlikely to lose entire eggs.
You must do this for at least a week. In that time the hens and rooster will have exhausted their repertoire of tactics. Much longer than a week you might find they invent new ones, but most times you'll find that the hens and rooster no longer try to break the eggs, and no longer associate the 'I've just laid' call with fine food.
You've got nothing to lose by trying this, and it can be done on a concrete floor (preferably with a tiny sprinkling of fine litter like sawdust, just to help cushion the egg, but not enough to stop it rolling) or a dirt floor. The eggs will be dirtier than you'd like, but after a week or so you can think about returning the chickens to their usual pen. You may not want to use the same old nestbox as formerly (as it may awaken memories) or perhaps you might use other tactics like darkening and raising the box just to reinforce the new situation.
I've cured 2 sets of egg eaters in this fashion, because it breaks the cycle of birds associating one another's 'I've just laid' squawk with food.
Good luck!