Join Joseph Lowery for an in-depth discussion in this video Solution: Filters, part of Laravel 4 Essential Training (2014).
- I'll admit there's a little bit of a curve ball…in this challenge.…But if you were listening carefully…to my previous lesson on filters…you should be able to hit it out of the park.…Well the first part of this challenge…is to create a filter for your birthday…that uses a parameter.…So I'm gonna start in filters.php…and I'll go down to the bottom of the file…and I have one filter that we did…that already uses a parameter…so let's copy that one,…and then I'll paste it in.…
I'm gonna make some necessary changes…so that it'll work with a date rather than an integer.…So first I'll change the name from "age" to "birthdate"…and also change the variable there to match.…Ok that looks good.…Now let's get rid of our interior of the if clause here…and I'm gonna make this a date.…Let's just do a month and day,…so that it triggers every year.…
And I want to make that equal to…whatever the variable is, in which case it's birthday.…And if we get that, well than we'll just return…happy birthday, maybe with a capital H.…It's a party right?…
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
Q: In the "Installing Laravel" video, the author provides instructions for changing permissions on the web server directory, as well as setting up a new project and cd-ing to the new app directory, using commands on a Mac. What commands do I type in Windows?
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.