Routing

Visualize URL routing and controller mapping

Laravel matches incoming URLs to route definitions. Type a URL and method to see which route handles it.

GET/HomeController@index
GET/postsPostController@index
GET/posts/{id}PostController@show
POST/postsPostController@store
DELETE/posts/{id}PostController@destroy
GET/aboutPageController@about
PHP
// routes/web.php
Route::get('/', [HomeController::class, 'index']);
Route::get('/posts', [PostController::class, 'index']);
Route::get('/posts/{id}', [PostController::class, 'show']);
Route::post('/posts', [PostController::class, 'store']);
Route::delete('/posts/{id}', [PostController::class, 'destroy']);
Route::get('/about', [PageController::class, 'about']);