Models and entities, while on most occasions fetch data from a DB, they do not necessarily require a DB connection. They may connect to a different repository of information—for example, an API or a file system). Since the Landon Hotel application will be using a database to save their data, you can tell Symfony that in this case you will be using a DB.
- [Instructor] So our application is ready…to use real data from the database.…So the first thing we'll need…to do is add clients to the database.…Since we already have the processing code…to cache the form data, well, let's open up…our clients controller and source A-P-P…bundle controller, clients controller.…Since we already have the processing code…to cache the form data, let's reuse…from the show details method that we previously built.…So let's just copy form…until right before the else statement,…and we're going to paste it right after the form title, paste.…
We'll also need to import our entity.…So let's do that, let's go to the beginning of the file…and use A-P-P bundle, backslash entity,…backlash client, and now, for the magic to start,…we'll need a doctrine manager.…So let's go to where we pasted the code…right here, no, right about here, okay.…Let's create a doctrine manager with E-M,…this, get doctrine, get manager.…
Now we'll create a client instance…with client equals new client,…and all of our client's attributes,…
- 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 36m 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.