Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

SymfonyCasts

Doctrine, Symfony 6 & the Database

via SymfonyCasts

Overview

After the first two courses, we're going to turn the volume to 11! Yup, it's database time!

This tutorial is all about Doctrine: a powerful ORM that will allow us to talk to a database from inside our Symfony app. With the power of PHP 8 & tools inside Symfony, Doctrine is not only the most powerful ORM in PHP, it's also a joy to work with. You are going to love it!

  • Booting a database with Docker via the Flex recipe system
  • Database config
  • Creating (and updating) Entities with make:entity
  • Generating & using migrations
  • Inserting new data
  • Fetching & Querying for data
  • Doctrine Repositories
  • Custom queries and the query builder
  • Fixtures (Dummy data) using Foundry
  • Relationships & Associations

SELECT * FROM doctrine_knowledge.

Syllabus

  • Installing Doctrine
  • docker-compose & Exposed Ports
  • Docker & Environment Variables
  • The "symfony console" Command & server_version
  • Entity Class
  • Migrations
  • Adding new Properties
  • Persisting to the Database
  • Querying the Database
  • Custom Entity Methods & Twig Magic
  • The Query Builder
  • Querying for a Single Entity for a "Show" Page
  • Param Converter & 404's
  • The Request Object
  • Updating an Entity
  • Flash Message & Rich vs Anemic Models
  • Doctrine Extensions: Timestampable
  • Clean URLs with Sluggable
  • Simple Doctrine Data Fixtures
  • Foundry: Fixtures You'll Love
  • Pagination
  • Forever Scroll with Turbo Frames

Taught by

Ryan Weaver

Reviews

Start your review of Doctrine, Symfony 6 & the Database

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.