Category: Laravel

Quick Life Hacks with the Eloquent Model

Hi folks, It’s no secret that I love Laravel, and especially love Eloquent. This post isn’t about why various people don’t like Eloquent, etc, etc. but just some “life hacks” of working with Eloquent. #1 – Naming Conventions I personally like to use the following naming convention on my databases (using a forum as an […]

Read more

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 […]

Read more