Join Joseph Lowery for an in-depth discussion in this video Expanding filters, part of Laravel 4 Essential Training.
- The previous lesson gave you…the basics for working with Laravel filters.…Let's now expand on that concept,…starting with techniques for applying multiple filters.…To demonstrate, I'm gonna set up two more filters,…each targeting a different day.…I'm gonna copy my…New Year filter here,…and then go down below and I'll just paste it twice quickly,…and then make a few modifications.…So let's change the first one to Valentine's,…and change that date to 2/14,…and then we'll change the next one to Halloween,…and change that to 10/31.…
Oh, let's change the messages too.…Wouldn't that be a good idea?…You bet it would.…So, "Be my Valentine,"…gotta throw an exclamation mark in there,…and "Trick or Treat."…Alright, now that we have three dates to check,…how do you tie them into the route?…Well, Laravel has two approaches you can take.…First, there's a basic PHP array method.…That will seem very familiar to you, I'm sure.…So, go back to routes.php…and right where we have our before filter set up,…I'm going to throw in the keyword 'array,'…
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?
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.