如何更改laravel 5.5的注册链接

时间:2017-12-01 07:49:01

标签: php laravel laravel-5

我有以下Laravel代码,它为我提供了domain.com/register链接。

我想更改domain.com/register?ref=abc

我尝试添加route('register') ?ref=abc,但它没有用。

<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 个答案:

答案 0 :(得分:1)

如果您尝试使用route()将参数传递到网址,请执行以下操作:

route('routeName', ['param'=>'value'])

https://laravel.com/docs/5.5/helpers#method-route