<code><span><<span>a</span><span>href</span>=<span>"/site/contact?id={!! 1 !!}&name={!! 2 !!}"</span>></span>fdsaf<span></<span>a</span>></span><span><<span>Br</span>></span><span><<span>a</span><span>href</span>=<span>"{!! url('site/contact',['id'=>1,'name'=>2]) !!}"</span>>test<span></<span>a</span>></span></code>
The generated address is as follows:
<code><span><<span>a</span><span>href</span>=<span>"/site/contact?id=1&name=2"</span>></span>fdsaf<span></<span>a</span>></span><span><<span>br</span>></span><span><<span>a</span><span>href</span>=<span>"http://localhost:8000/site/contact/1/2"</span>></span>test<span></<span>a</span>></span></code>
The second parameter of url is not generated
http://localhost:8000/site/contact/id/1/name/2
At this time, it will not jump to http://localhost:8000/site/contact
This address requested data, but it was reported that it could not be found
Other references:
http://www.ekan001.com/articles/43
The above introduces the address generated in laravel template view, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.