如何更改 laravel 5.5 中的寄存器 link?

How to change register link in laravel 5.5?

我想将我的注册 link 更改为域名。com/register?ref=abc 如何在 laravel 5.5 中完成?

<a style="margin-bottom: 5px;font-size: 17px;font-weight: 600;" href="{{ route('login') }}" class=""><i class="fa fa-sign-in"></i> Log In</a>
                        &nbsp;&nbsp;&nbsp;<a style="margin-bottom: 5px;font-size: 17px;font-weight: 600;" href="{{ route('register') }}" class=""><i class="fa fa-user-plus"></i> Registration</a>

1。高估默认 auth 路由:

您可以通过设置 routes/web.php 并根据需要更改它们来覆盖默认的身份验证路由:

{
    // Authentication Routes...
    $this->get('login', 'Auth\LoginController@showLoginForm')->name('login');
    $this->post('login', 'Auth\LoginController@login');
    $this->post('logout', 'Auth\LoginController@logout')->name('logout');

    // Registration Routes...
    $this->get('register', 'Auth\RegisterController@showRegistrationForm')->name('register');
    $this->post('register', 'Auth\RegisterController@register');

    // Password Reset Routes...
    $this->get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm');
    $this->post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail');
    $this->get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm');
    $this->post('password/reset', 'Auth\ResetPasswordController@reset');
}

2。直接在 html 锚标签上更改它:

您可以省略 named routes 并直接使用 link :

<a style="margin-bottom: 5px;font-size: 17px;font-weight: 600;" href="http://example.com/register?ref=abc" class=""><i class="fa fa-user-plus"></i> Registration</a>

<a style="margin-bottom: 5px;font-size: 17px;font-weight: 600;" href="{{ route('register') }}/?ref=abc" class=""><i class="fa fa-user-plus"></i> Registration</a>

希望对您有所帮助