laravel 8 get current route code example
Example 1: laravel get current route name
Route::getCurrentRoute()->getActionName();
Example 2: laravel 8 route
Route::get(
'/user/profile',
[UserProfileController::class, 'show']
)->name('profile');
Example 3: laravel route
Route::get('user/profile', [UserProfileController::class, 'show'])->name('profile');