laravel 8 route::controller code example
Example 1: laravel route controller
use App\Http\Controllers\UserController;
Route::get('user/{id}', [UserController::class, 'show']);
Example 2: laravel 8 route
Route::get(
'/user/profile',
[UserProfileController::class, 'show']
)->name('profile');