How to Laravel route with Get to a specific method in a class
RoutingRouting to a specific controller method in Laravel is easy but only if you know the newer syntax.
Here it is:
Route::get('/user', [UserController::class, 'index']); lang-php
Routing to a specific controller method in Laravel is easy but only if you know the newer syntax.
Here it is:
Route::get('/user', [UserController::class, 'index']); lang-php