This video provides you with the skills to write a Laravel route, which is the gateway into your Laravel application from the rest of the internet.
- [Instructor] Controllers in Laravel … and another model view controller, or MVC frameworks … are the part of the application … that ties together the model, or the data storage layer, … basically the database, and the view, … where we format the actual HTML, … or whatever we use to present our user interface. … Creating a controller in Laravel follows a pattern, … we should be pretty comfortable with at this point. … We'll start with using php artisan to make a controller. … First, be sure the homestead box is booted, … and we'll be in the code directory … inside of our homestead box. … We'll make a single action controller, … or a controller with only a single action in it. … We'll call this controller show rooms. … This controller is going to show the rooms for our hotel. … A single action controller in Laravel … uses the tag invokable, … which uses the PHP magic method of invoke to be invoked. … So our command is php artisan make:controller … ShowRoomsController --invokable. … Now we can go to our routes file in our text editor …
- Exploring Laravel
- Setting up simple authentication
- Controllers and routes
- Create and index view
- Show, edit, and destroy views
- Writing scopes in Laravel Eloquent
- Creating one-to-one relationships
Skill Level Beginner
MVC Frameworks for Building PHP Web Applicationswith Drew Falkman2h 57m Intermediate
Ajax with PHP: Add Dynamic Content to Websiteswith Kevin Skoglund3h 37m Intermediate
What you should know1m 52s
2. Starting Your Project
3. The Create and Index Views
4. The Show, Edit, and Destroy Views
- 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.