On Symfony, and more specifically Doctrine, we tend to think about data as object, and as such, to update an record on the DB, we first need to fetch its representing object. Let's update and object and modify it using Doctrine. Let's also talk about logical operations and physical operations within our application structure and when we should use which to delete records.
- [Narrator] Updating data on the database…is very, very simple.…However, it does have a catch.…First, we need to establish which record we need to update,…so we first have to select it.…So let's go to show details, and when the form is submitted,…let's find the record.…Here's where it's submitted.…And now let's just do client is equal to client repo,…find.…Get it from the ID, ID underscore client,…and now we simply set the values to be updated.…
Now let's do the same thing with the Doctrine manager…with em is equal to this get Doctrine.…Let's chain, get manager, and now let's flush the data.…And let's also add the missing cherry.…Return this redirect to route index underscore clients.…Now let's test it on the browser,…and let's change the name and the email address.…
And viola, now let's get on to our booking agent.…
- 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
PHP: Clean URLs on Apache Serverwith David Powers1h 35m Intermediate
PHP: Managing 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.