Basics of Laravel API Development — Controller, FormRequest, Eloquent, DI
An introduction to API backend development for those new to Laravel. It covers routing, controllers, FormRequest, API Resource, Eloquent ORM, the DI container, Sanctum authentication, and the PHP 8.x syntax used in this book (readonly / enum / constructor promotion).
Domain Model and Table Design — Mapping and Indexes
Covers why to design domain-model-first, mapping patterns under the premise that the domain model and tables are not 1:1 (embedding / one aggregate across multiple tables / technical splitting), how the repository absorbs the gap, and index design including the leftmost-prefix rule for composite indexes and its trade-offs.
The Repository Pattern — The Boundary Between Domain and Persistence
Implements the repository pattern with Laravel + Eloquent. Covers why the interface lives in the domain layer (DIP / testability), one aggregate = one repository, mapping between entities and Eloquent Models, the N+1 problem and eager loading, mass-assignment protection, and registration in the DI container.