我有以下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>
<a style="margin-bottom: 5px;font-size: 17px;font-weight: 600;" href="{{ route('register') }}" class=""><i class="fa fa-user-plus"></i> Registration</a>
答案 0 :(得分:1)
如果您尝试使用route()
将参数传递到网址,请执行以下操作:
route('routeName', ['param'=>'value'])