Join Joseph Lowery for an in-depth discussion in this video Applying controllers, part of Laravel 4 Essential Training.
- So far, all of the routes that we've built up…and applied in Laravel have used functions…referred to as closures.…But there's another more elegant,…more powerful approach-controllers.…In this lesson I'll introduce you…to this robust methodology.…Controllers are a specific type of php class…used for handling routing.…Each controller is typically composed of one…or more public methods called actions.…An action is essentially the same as a closure,…but because it is cloaked in a class,…it's better suited for object oriented programming.…
So let's get right to it by going into an example…that luckily, Laravel provides.…When Laravel installs, there are a number…of controllers included by default,…including one designed to handle the welcome page.…I'm going to start by going to routes.php,…which I have open in my code editor,…and commenting out our existing route…to the welcome page, which starts on line 14.…It's one that we've been building up with our filters.…So let me just make a little extra line…and we will comment this particular one out,…
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.