With Active Record, you basically just have an object that you can manipulate and then save. Calling
save()on the object updates the database, and all of the magic persistence happens behind the scenes.
Having the business logic of the object and the persistence logic of the database tied together definitely makes working with an Active Record ORM easier to pick up.
In this tutorial I want to explore exactly how Doctrine 2, an ORM that implements the Data Mapper pattern, is different to Eloquent.
Every two weeks I send out a newsletter containing lots of interesting stuff for the modern PHP developer. You can expect quick tips, links to interesting tutorials, opinions and packages. Want to learn the cool stuff? Then sign up now!