Join Joseph Lowery for an in-depth discussion in this video Developing a master layout, part of Laravel 4 Essential Training.
- View Offline
- Exercise Files
- The very word "template" implies that there's something…that the template derived pages are made from.…These are often called "master pages"…and Laravel simply calls them "layouts".…In this lesson, I'll show you how to create…a master layout that other pages can use as,…you got it, a template.…Laravel typically stores its layouts in the Views folder,…in a sub folder called Layouts.…Now, these are standard blade templates.…
Let's create the basis for one, a boiler plate if you will.…I'm gonna create a basic HTML page in my code editor.…Let me go ahead and just create that folder first.…And then within that, I'll create this HTML page.…And I'm just gonna call it "main.html" for now.…And I'm gonna just convert it to a blade template…by doing a Save As.…
And of course we do wanna save it as main.blade.php…and then we can just go ahead…and delete these other file that we don't need anymore.…Alright, blade layouts can satisfy areas of the page…for content to be inserted into, in two different ways.…If you wanna completely replace an area, use @yield.…
Need a quick dive into Laravel? Check out this short primer, Up and Running with Laravel.
- Installing Laravel and Composer
- Routing requests
- Filtering routes
- Incorporating advanced controllers
- Creating a basic Blade template
- Developing a layout with child pages and forms
- Integrating a database
- Creating tables via migrations
- Outputting data
- Building a Laravel app
- Authenticating users
- Deploying Laravel code
Skill Level Intermediate
1. Introduction to Laravel
2. Fundamental Laravel Concepts
3. Outputting Laravel Code
4. Integrating Databases
5. Querying Data with Eloquent ORM
6. Building a Laravel App
7. Deploying 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.