<a href="/site/contact?id={!! 1 !!}&name={!! 2 !!}">fdsaf</a><Br>
<a href="{!! url('site/contact',['id'=>1,'name'=>2]) !!}">test</a>
生成的地址如下:
<a href="/site/contact?id=1&name=2">fdsaf</a><br>
<a href="http://localhost:8000/site/contact/1/2">test</a>
url第二个参数并不是生
http://localhost:8000/site/contact/id/1/name/2
此时并不会跳到http://localhost:8000/site/contact
这个地址请求数据,而是报指不到
其它参考:
http://www.ekan001.com/articles/43