The route function generates a URL for a given named route:
<?php $url = route('route.name');
<?php     {

        foreach (['dashboard', 'home'] as $uri) {

            if (Route::has($uri)) {

                return route($uri);

            }

        }
<?php             return call_user_func(static::$createUrlCallback, $notifiable, $this->token);

        }



        return url(route('password.reset', [

            'token' => $this->token,

            'email' => $notifiable->getEmailForPasswordReset(),

        ], false));

    }
<?php     {

        $this->app->afterResolving(HttpKernel::class, function ($kernel) use ($callback) {

            $middleware = (new Middleware)

                ->redirectGuestsTo(fn () => route('login'));



            if (! is_null($callback)) {

                $callback($middleware);
<?php     {

        return $this->shouldReturnJson($request, $exception)

                    ? response()->json(['message' => $exception->getMessage()], 401)

                    : redirect()->guest($exception->redirectTo($request) ?? route('login'));

    }
<?php     public function assertRedirectToRoute($name, $parameters = [])

    {

        $uri = route($name, $parameters);



        PHPUnit::assertTrue(

            $this->isRedirect(),
<?php     public function assertRedirectToSignedRoute($name = null, $parameters = [])

    {

        if (! is_null($name)) {

            $uri = route($name, $parameters);

        }



        PHPUnit::assertTrue(
<?php                 $message = $notification->toMail($user);



                return ! is_null($notification->token)

                    && $message->actionUrl === route('password.reset', ['token' => $notification->token, 'email' => $user->email]);

            }

        );

    }
<?php         Notification::fake();



        ResetPassword::createUrlUsing(function ($user, string $token) {

            return route('custom.password.reset', $token);

        });



        UserFactory::new()->create();
<?php                 $message = $notification->toMail($user);



                return ! is_null($notification->token)

                    && $message->actionUrl === route('custom.password.reset', ['token' => $notification->token]);

            }

        );

    }
<?php             return (new MailMessage)

                ->subject(__('Reset Password Notification'))

                ->line(__('You are receiving this email because we received a password reset request for your account.'))

                ->action(__('Reset Password'), route('custom.password.reset', $token))

                ->line(__('If you did not request a password reset, no further action is required.'));

        });
<?php                 $message = $notification->toMail($user);



                return ! is_null($notification->token)

                    && $message->actionUrl === route('custom.password.reset', ['token' => $notification->token]);

            }

        );

    }
<?php                 $message = $notification->toMail($user);



                return ! is_null($notification->token)

                    && $message->actionUrl === route('custom.password.reset', ['token' => $notification->token, 'email' => $user->email]);

            }

        );

    }
<?php         Notification::fake();



        ResetPassword::createUrlUsing(function ($user, string $token) {

            return route('custom.password.reset', $token);

        });



        UserFactory::new()->create();
<?php                 $message = $notification->toMail($user);



                return ! is_null($notification->token)

                    && $message->actionUrl === route('custom.password.reset', ['token' => $notification->token]);

            }

        );

    }
<?php             return (new MailMessage)

                ->subject(__('Reset Password Notification'))

                ->line(__('You are receiving this email because we received a password reset request for your account.'))

                ->action(__('Reset Password'), route('custom.password.reset', $token))

                ->line(__('If you did not request a password reset, no further action is required.'));

        });