While you may use HTML and PHP to create your views (PHPTemplate), Symfony comes with a very powerful templating engine called Twig, which removes logic from the views and also allows you to inherit reusable elements on the view such as a header or a footer. Twig also comes with some powerful tools such as filters and also allows you to include other templates.
- [Instructor] So if we try to click on…the clients link we'll get an error…and that's because we have to fix…the links on the template.…So let's do that.…Let's open our base, twig, file and correct these links.…This is going to be home, we'll do…double curvy brackets, path,…home.…This is going to be the same, just copy and paste.…And change the name of the route to reservations…and I believe it's client index but let's make sure.…
It's index_clients.…We'll just copy, let's go back here and paste.…Let's refresh on the browser.…Let's go back , refresh.…And now it's corrected.…So let's go back and use the template…on the rest of the pages.…So let's start with reservations.…Let's open up the reservation view, index.…And let's open the index view.…And let's copy the block body and the extends part.…Paste it.…
Let's also copy the endblock part and paste it.…Save and refresh, okay.…Now let's go back to clients.…Let's go to edit and let's do the same for the form.…So let's open clients, form and do the exact same thing.…Copy,…
- 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.