Working With Eloquent
Understand Active Record, organise important queries, separate persistence from business objects, and investigate database performance. Expressive is an optional package-based approach.
4 articles published
Start readingReading order
Articles in this series
Follow the order below, or choose the article you need.
-
01
Understanding Laravel Eloquent's Active Record Pattern
Laravel’s Eloquent makes it feel almost magical to move data in and out of your database. Under the hood, that magic is powered by the Active Record pattern, that's a straightforward way to treat a database row as a first-class PHP object with built-in CRUD behaviour. In this article I'll explain what the Active Record pattern is, its pros and cons and we will build a tiny implementation of it in plain PHP for you to understand better the mechanics behind Eloquent.
Aug 8, 2025 · 15 minutes
-
02
Eloquent Query Classes Pattern
Learn how to use Eloquent Query Classes to organize important database logic in Laravel without adding a full repository layer.
Jun 8, 2026 · 17 minutes
-
03
Improving Laravel Architecture With Expressive
Learn how Expressive can improve a Laravel application by keeping Eloquent as the database layer while moving business logic to fully typed objects.
Jun 1, 2026 · 11 minutes
-
04
Eloquent Performance and Database Design: Evidence Before Eager Loading
A deep dive into Eloquent performance, from detecting N+1 queries to choosing aggregates, indexes, query plans, pagination, chunking, and transaction boundaries for a growing team dashboard.
Sep 10, 2026 · 28 minutes