Among some of the advantages that come with using Doctrine are the DB actions that we may perform on tables. We could write our queries on a language similar to SQL called DQL, but for now you can use Doctrine's QueryBuilder to create your queries to the DB. Let's also create some getters and setters to persist data in the DB.
- [Voiceover] Now, we are going to select the data that we…already have in our client's table.…So first, let's erase the client's array so we won't…get confused.…So let's erase this private client data, and now let's…select all our records with our ORM.…So let's go to show index, this will no longer work.…And now let's do a client.…Client is equal to this, getDoctrine, getRepository.…
And let's change this and inside getRepository we're going to…name our client with AppBundle, colon, client.…And now, findAll, semicolon.…And let's add that to the view with data, clients is…equal to the variable we just defined, with clients.…This is where an ORM comes in handy.…We now have access to methods such as findAll,…find, findBuy, et cetera.…
We'll be using findAll to get all of our records, and the…method find to find any record by it's ID.…So let's go to the view.…And let's change the client name to camel case.…Let's go to client.…So let's change last name into camel case.…Now let's go back into the browser.…And, refresh.…
- Installing Symfony
- Setting up the local environment
- Exploring the Symfony file structure
- Creating routes
- Sending parameters to a controller
- Using views
- Updating routes
- Creating templates with Twig
- Data modeling with Symfony
- Demo application deployment
Skill Level Intermediate
Managing PHP Persistent Sessionswith David Powers2h 41m Intermediate
1. Get Started with Symfony
Install Symfony1m 33s
2. Controllers in Symfony
3. Views in Symfony
4. Data Modeling with Symfony
5. Taking Symfony Further
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.