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 →
CPX: The Composer Package Executor for PHP image

CPX: The Composer Package Executor for PHP

Read article
Laravel AI SDK Adds Human-in-the-Loop Tool Approval image

Laravel AI SDK Adds Human-in-the-Loop Tool Approval

Read article
Pest 5 Released With Test Impact Analysis, Agent Verification, and Evals image

Pest 5 Released With Test Impact Analysis, Agent Verification, and Evals

Read article
Queue-SQL: Run Mass Deletes and Updates Across Parallel Queue Jobs image

Queue-SQL: Run Mass Deletes and Updates Across Parallel Queue Jobs

Read article
Blade Formatting in Laravel Pint image

Blade Formatting in Laravel Pint

Read article
Inertia DevTools Is Now on the Chrome Web Store image

Inertia DevTools Is Now on the Chrome Web Store

Read article