In this video, learn how to write your very first Laravel controller, your entry point for the magic that makes a Laravel application shine.
- [Instructor] Routes in Laravel are essentially … the central part of our application. … The route in Laravel is how the application … knows what to do for any URL. … A Laravel route, in essence, says … for a URL matching this pattern, perform this work. … Sometimes that means calling another class. … Sometimes it's calling a specific line of code … right there in our routes file. … So what does this look like in reality? … Let's try this by building out a new route. … Open up the project files to the routes directory. … Inside of the routes directory, … you will see that there's a couple of different files: … API, channels, consult, and web. … The API describes routes that are behind … our API middleware section. … Let's build one out. … We'll open the api.php file, … and we'll add a new route on line 20. … We'll add the route colon colon git, … and inside of single quotes, forward slash test, … and then we'll add a closure function here, … function, parentheses, curly braces, and return …
- 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.