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