Skip to content

Day: August 30, 2017

How Eloquent breaks the Single Responsibility Principle, and why I’m okay with it

Hi everyone I thought I would discuss a controversial one today, in order to give an articulated response to a common argument about Eloquent (and generally the Active Record pattern) Firstly, just in case you don’t know, here are some definitions: Single Responsibility Principle: The “S” in the “SOLID” principles. In short, this means one class should have one job. The idea is to keep your code modular and easy to switch out. SOLID Principles: I’ll do an article on this one day, but it’s a discussion for another time. Like all principles or methodologies they’re like the Pirate’s Code, they’re more…

1 Comment