laravel controller get route code example
Example 1: laravel route controller
use App\Http\Controllers\UserController;
Route::get('user/{id}', [UserController::class, 'show']);
Example 2: laravel get route
Route::get('foo', function () {
return 'Hello World';
});