Archived video

This video is archived and won't be updated. We're keeping it online for now as a courtesy.

Alternate resources: 

Insert and Query a Database with Doctrine

Video loading...

Transcript language code: 

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:03
    Insert and Query a Database with Doctrine
  • 0:07
    with Leanna Pelham
  • 0:08
    We can use the play script
  • 0:10
    to create and save our first event object.
  • 0:13
    Start by importing the Event class' namespace.
  • 0:45
    Let's save this wild event.
  • 0:48
    To do that, we use a special object called the EntityManager.
  • 0:51
    It's basically the most important object in Doctrine,
  • 0:55
    and is in charge of saving objects and fetching them back out.
  • 0:58
    To get the EntityManager, first grab a service from the container
Loading ...

Insert and Query a Database with Doctrine


In this lesson, you will start using Doctrine to insert and query a database. First, you need to actually create and configure the database. Once we have that all set up, you will query the database, and render the results with Twig.

Log in or sign up to download companion files.
Additional resources: