Join Joseph Lowery for an in-depth discussion in this video Working with Blade templating, part of Learning Laravel 4.
Back in the previous chapter,…when discussing Laravel views, I mentioned that…two types of templates were supported in the framework,…PHP and Blade.…While PHP works as expected,…it's pretty clunky when you start…to compare it to Blade…and Blade is so dirt simple to use…there's no reason to hold back.…Let me show you what I mean.…In my code editor, I'm gonna open up…the original view, hello.PHP,…which is, of course, stored in the views folder.…
So now I'm going to scroll down to the content area…and let me change the H1 tag from…You have arrived to Blade has arrived…and instead of saving this as…a standard PHP template, hello.PHP,…I'm gonna save it as a Blade template…so I'll go to file, save as,…and in the same folder, which is first app,…make sure I'm in my app folder there,…and I want to put it in views,…I'll save it as hello.blade.PHP.…
Believe it or not, that is all you have to do…to create a Blade template, just save it…with the dot Blade dot PHP extension.…Now let's switch to routes.PHP.…I'll open that up.…You'll recall in the original file there was…
- Installing Laravel
- Handling testing
- Establishing an HTML view
- Connecting to a database
- Enabling version control
- Setting up-and-running unit tests
Skill Level Intermediate
1. Introduction to Laravel
2. Creating Initial Laravel Pages
3. Displaying Laravel Code
4. Creating a Laravel Application
5. Testing Your Laravel Code
- 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.