Skip to content
whichdevtool?
Categories ▾

Frameworks and UI

Frontend and full-stack frameworks Backend frameworks UI component libraries

Hosting

VPS and cloud servers App hosting and PaaS

Data

Managed databases File and object storage ORMs and database toolkits

AI

AI model APIs

Email

Transactional email APIs Email marketing and newsletters

Payments

Payments and billing

Domains and edge

Domain registrars CDN, DNS and edge security

Operations and identity

Monitoring, uptime and error tracking Auth and identity Background jobs, queues and workflows
Stacks Directory
Ctrl K

Search directory
Menu
StacksDirectory Pricing changes Glossary
VPS and cloud servers App hosting and PaaS Managed databases Transactional email APIs Email marketing and newsletters Domain registrars CDN, DNS and edge security Monitoring, uptime and error tracking Auth and identity Frontend and full-stack frameworks Backend frameworks UI component libraries AI model APIs File and object storage Payments and billing Background jobs, queues and workflows ORMs and database toolkits
  1. Home
  2. ORMs and database toolkits
  3. Eloquent ORM
EO

Active Record ORM for Laravel · by Laravel

Eloquent ORM

Laravel's built-in Active Record ORM: one model class per table, expressive relationships, scopes, events and soft deletes, with Laravel's schema migrations and five first-party databases.

Visit laravel.com ↗ Alternatives Open source Open source Self-hostable
laravel.com
Eloquent ORM homepage
§1

Overview

Eloquent is the ORM included with Laravel. Each database table has a model class, created with php artisan make:model, that follows naming conventions for table names, primary keys and timestamps. Models query their table fluently (Flight::where('active', 1)->orderBy('name')->get()), and relationships such as hasMany, belongsTo, belongsToMany and polymorphic relations are declared as methods and eager-loaded with with().

Laravel provides first-party support for MariaDB 10.3+, MySQL 5.7+, PostgreSQL 10+, SQLite 3.26+ and SQL Server 2017+, and MongoDB maintains an official package for it. Schema changes are made with Laravel migrations, which are generated by Artisan and written with the database-agnostic Schema facade; migrations can be squashed into a schema dump as a project grows.

Eloquent also offers casts, accessors and mutators, global and local scopes, model events and observers, soft deletes, pruning and strictness settings that can flag lazy loading during development. It is tied to Laravel's Illuminate components; using it outside Laravel is possible but less common.

§2

Pricing and plans

Plan Price What you get
Eloquent (Laravel) $0 Part of the MIT-licensed Laravel framework

Eloquent is free as part of the Laravel framework; no paid product is needed to use it.

Source: laravel.com/docs/13.x/database · prices as published, excluding tax.

§3

What it does

Active Record models
Each model reads and writes its own table, with conventions for names, keys and timestamps.
Relationships
One-to-one, one-to-many, many-to-many, has-many-through and polymorphic relations with eager loading.
Scopes, casts and events
Global and local query scopes, attribute casting and model events or observers.
Soft deletes and pruning
Mark rows deleted instead of removing them, and prune old models on a schedule.
Migrations
Artisan-generated migrations using the Schema builder, with rollback and schema squashing.
Strict mode
Options to prevent lazy loading and silently discarded attributes during development.
§4

Strengths and limitations

Strengths

  • Very quick to build CRUD features with Artisan generators
  • Readable, expressive API and excellent Laravel documentation
  • Large ecosystem of packages and tutorials
  • Five first-party databases plus official MongoDB support

Limitations

  • Tied to Laravel; standalone use outside the framework is uncommon
  • Active Record mixes persistence into domain models, which can grow large
  • Lazy loading can cause N+1 queries unless you eager-load or enable strict mode
  • Migrations are written by hand, not generated by diffing models
§5

Who it suits

Good for

  • Laravel applications
  • Teams that want fast CRUD development in PHP
  • SaaS products built on Laravel's ecosystem

Look elsewhere if

  • Symfony or framework-agnostic PHP projects (Doctrine fits better)
  • Complex domain models that benefit from a data mapper
§6

Alternatives to Eloquent ORM

Tool From Free option Stages
AR
Active Record (Rails) Active Record ORM for Ruby on Rails
— Open source
Da
Dapper .NET micro-ORM
— Open source
SQLAlchemy Python SQL toolkit and ORM
— Open source
EF
Entity Framework Core .NET ORM
— Open source
Sq
sqlc SQL-to-code compiler
— Open source
TypeORM Decorator-based TypeScript ORM
— Open source

All ORMs and database toolkits →

§7

Questions

Which databases does Eloquent support?

MariaDB, MySQL, PostgreSQL, SQLite and SQL Server first-party, and MongoDB through the mongodb/laravel-mongodb package maintained by MongoDB.

Does Eloquent generate migrations from models?

No. Artisan generates migration files, which you write with the Schema builder.

Can I use Eloquent without Laravel?

It is possible through the Illuminate database component, but it is designed and documented for use inside Laravel.

Sources read for this page

  • https://laravel.com/docs/12.x/eloquent
  • https://laravel.com/docs/13.x/database
  • https://laravel.com/docs/13.x/migrations
Spec sheet
From
Open source
Free tier
Free to self-host
Stages
HobbyIndieStartupScale-upEnterprise Suits hobby, indie, startup, scale-up, enterprise
Language
PHP
Approach
Full ORM (Active Record)
Databases
MariaDB, MySQL, Postgres, SQLite, SQL Server, MongoDB
Migrations
Yes, Laravel migrations (written with the Schema builder)
Open source
Yes
Self-host
Yes
EU data
Not stated
Category
ORMs
Visit laravel.com ↗

To report an out-of-date price or limit, use the correction form.

whichdevtool?

Developer and cloud tools compared on price, free tier and limits, each with its source. For side projects, solo developers and small teams.

Categories

  • VPS and cloud servers
  • App hosting and PaaS
  • Managed databases
  • Transactional email APIs
  • Email marketing and newsletters
  • Domain registrars
  • CDN, DNS and edge security
  • Monitoring, uptime and error tracking
  • Auth and identity
  • Frontend and full-stack frameworks
  • Backend frameworks
  • UI component libraries
  • AI model APIs
  • File and object storage
  • Payments and billing
  • Background jobs, queues and workflows
  • ORMs and database toolkits

Research

  • Directory
  • Stacks by project
  • Developer news
  • Pricing changes
  • Glossary

Site

  • About and methods
  • How we make money
  • Suggest a tool or fix
  • Privacy
© 2026 whichdevtool.com Prices change. Each tool page links to its source. We may earn a commission when you sign up through links on this site. How we make money