Link - https://dev-ani.com/laravel-web-routes/
The router allows you to register routes that respond to any HTTP verb:
Route::get($uri, $callback);
Route::post($uri, $callback);
Route::put($uri, $callback);
Route::patch($uri, $callback);
Route::delete($uri, $callback);
Route::options($uri, $callback);
GET Request Example 1
Route::get('/clients', function () {
return "Customers List";
});
GET Request Example 2 returning a View
Route::get('/clients', function () {
return view('list_clients')
});
GET Request Example 3, returning a Controller method
Route::get('/clients', [App\Http\Controllers\ClientController::class, 'index']);
Watch video Laravel Routes - Get Requests - Returning String, View, or a Controller Method with laravel Routes online without registration, duration hours minute second in high quality. This video was added by user Dev-Ani 14 December 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 106 once and liked it 1 people.