Definindo rota através do controlador
use App\Http\Controllers\UserController;
Route::get('/user', [UserController::class, 'index']);
Healthy Hamster
use App\Http\Controllers\UserController;
Route::get('/user', [UserController::class, 'index']);