← Back to Course

Introduction to Eloquent ORM

Eloquent is Laravel's built-in object-relational mapper (ORM), and it's one of the framework's signature features. Rather than writing raw SQL for every database interaction, Eloquent lets developers work with plain PHP objects that represent rows of data.

What an ORM Actually Does

An ORM bridges the gap between a relational database and an object-oriented codebase. Each database table is represented by a model class, and each row in that table becomes an instance of that class, with columns accessible as simple object properties.

Why Eloquent Feels Different

Compared to many other ORMs, Eloquent favors simplicity and readability. Common operations read almost like plain English, and the "active record" pattern it follows means a model instance can save, update, or delete itself directly, without needing a separate repository layer.

ConceptWhat It Represents
ModelA PHP class representing one database table
InstanceA single row within that table
AttributeA column value on a given row
Query BuilderThe underlying engine Eloquent uses to construct SQL

Benefits of Using Eloquent

Before Eloquent can do any of this, though, it needs an actual model class to work with — which is exactly what comes next: defining models and their matching migrations.

Ready to master Laravel Training Course?

Join Uncodemy's hands-on Laravel program and build real, production-ready applications.

Explore Course