Doctrine & the Database in Symfony 4
Learn how to use Doctrine ORM with Symfony to connect to a database. Create entities, generate migrations, insert and query data, and more. Discover the power of Doctrine and Symfony Flex for easier and rewarding development. Explore custom queries, fixtures, and relationships.
What you’ll be learning
Two episodes down! Booya! And we are super ready to put our new skills to the test! It’s finally time to make up app come alive by using Doctrine to connect to a database.
Doctrine is an amazing ORM that works great with Symfony and is super powerful. It also has a reputation for being hard to learn and for making you write a lot of code. But that’s changing! Thanks to some recent improvements and Symfony Flex, working with Doctrine has never been easier or more rewarding. So, let’s get started!
Creating (and updating) Entities with make:entity
Generating & using migrations
Inserting new data
Fetching & Querying for data
Custom queries and the query builder
Fixtures (Dummy data) using Faker
Relationships & Associations