The Humean view prevailing today is that laws of nature are mere regularities of the empirical events. However, there seems to be a difference between post factum regularities, like the Titius-Bode rule of planetary distances, and strict laws like universal gravity that operate without exception insinuating themselves into every occurence that falls under them. Even when they break down it is not through miraculous exceptions, but by being subsumed under another equally strict law. They manifest in a way suggesting that they somehow "constitute" reality rather than reflect its regularities.
Unfortunately, the Stanford article is more about defining what laws "are" than explaining how they might operate. There are two classical explanations, Kant's and Plato's. On Kant's account strict laws are inserted into phenomena by our mental faculties. It is hard to maintain today as a general explanation, if anything relativistic and quantum laws operate despite our mental a priori, not because of them. And even universal gravity according to Kant is empirical, not a priori.
Plato's view is of course that laws are ideas governing other ideas in the realm of ideas, and real things "imitate" ideas. "Back to Plato" movement got some momentum lately. Armstrong, Dretske and Tooley describe laws as relation among universals, which link properties of particulars. But it appears they replace imitation with "then a miracle occurs", which relates universals to particulars, or to us for that matter.
According to Hillary Putnam, "realism is the only philosophy that does not make the success of science a miracle". But on Humean account of laws as brute facts realism appears to lose its explanatory power. The exceptionless lack of miracles is itself a miracle, we might as well accept the brute fact of scientific success. If the miracle argument is taken seriously it leads much further than generic realism. Isn't Platonism the only philosophy that does not make the success of realism a miracle?
Is the miracle argument valid in its inference to "best explanation" for the laws of nature? If so, is there a way to avoid "miracles" without resorting to Platonism, or at least to provide a credible replacement for imitation? What are the modern non-realist accounts of the operation of natual laws and success of science in discovering them?