Laravel Doctrine: A Data Mapper Approach
summary
The talk compares Eloquent’s Active Record limits to Doctrine’s Data Mapper for Laravel, showing how to integrate Doctrine via composer and the laravel-doctrine bridge (auto-registered in Laravel 5.5). It emphasizes constructor-enforced invariants for valid entities, proxy-based lazy loading, EntityManager batching that collapses many operations into a single DB hit at flush, and repository use to hide SQL, with demonstrations of install steps, metadata-based schema create/update, migrations, and Doctrine’s wide adoption (28.5M downloads).
AI-written summary · about
chapters (10)
- 0:00Start
- 3:37Active Record Pattern
- 5:22Eloquent vs Doctrine
- 7:42Laravel Doctrine
- 8:04Laravel + Doctrine: Setup
- 14:32Schema generation
- 15:07Doctrine Entity Manager
- 16:15Doctrine Entity Repository: Generic
- 17:30Doctrine Entity Repository: Inheritance
- 17:55Doctrine Entity Repository: Composition








