Laravel Tutorials

Getting started with Doctrine 2 and Laravel

Published

Philip Brown has a new tutorial on getting started with Doctrine in Laravel. He talks a lot about the differences between Doctrine and Eloquent and why he likes one over the other.

It’s important to say, there is absolutely nothing wrong with Eloquent or the Active Record pattern. I’ve personally used Eloquent in a number of projects. Eloquent (and the Active Record pattern) make working with data and persistence in your application a total breeze.

However I do like the Data Mapper pattern and what it can offer you as a developer. I think using Doctrine 2 in a Laravel application is a good opportunity to write some tutorials on using the ORM and making good use of the different methodology. I’ve been looking at using it for a while, but Mitchell’s bridge package sealed the deal for me.

I’m looking forward to the rest of his series.

Eric L. Barnes photo

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Sponsored

laravelcloud logo
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud

The latest

View all →
Agent Run Observability in Laravel AI SDK 0.11 image

Agent Run Observability in Laravel AI SDK 0.11

Read article
Debounced Queued Event Listeners in Laravel image

Debounced Queued Event Listeners in Laravel

Read article
Statamic Mailables Viewer Previews Laravel Emails in the Control Panel image

Statamic Mailables Viewer Previews Laravel Emails in the Control Panel

Read article
Laravel Tackle: Run an AI Coding Agent in Your Laravel App image

Laravel Tackle: Run an AI Coding Agent in Your Laravel App

Read article
Queue::forward(): Reroute Laravel Queues in One Place image

Queue::forward(): Reroute Laravel Queues in One Place

Read article
Laravel Read-Through Filesystem: Lazy Storage Migration image

Laravel Read-Through Filesystem: Lazy Storage Migration

Read article