July 2018
Intermediate to advanced
420 pages
8h 46m
English
The routes within Laravel are responsible for directing all HTTP traffic coming from the user's requests, so the routes are responsible for the entire inflow in a Laravel application, as we saw in the preceding diagrams.
In this section, we will briefly look at the types of routes available in Laravel, and how to create a simple route for our MVC component.
At this point, it is only necessary to look at how the routes work. Later in the book, we will get deeper into application routing.
So, let's look at what we can use to handle routes in Laravel:
| Code | HTTP | METHOD |Verb |
|
Route::get($uri, $callback); |
GET |
|
Route::post($uri, $callback); |
POST |
|
Route::put($uri, $callback); |
PUT |
|
Route::patch($uri, $callback); |
Read now
Unlock full access