Laravel - Routing - Named Routes

Named routes allow the convenient generation of URLs or redirects for specific routes. You may specify a name for a route by chaining the name method onto the route definition:


Route::get('/user/profile', function () {
    //
})->name('profile');

You may also specify route names for controller actions:


Route::get(
    '/user/profile',
    [UserProfileController::class, 'show']
)->name('profile');
Route names should always be unique.