简体   繁体   English

Laravel表单方法get-url参数

[英]Laravel form method get - url parameters

I got a form in laravel with Method='GET' 我在Laravel中使用Method='GET'获得了一个表格

{{ Form::open(array('method' => 'get')) }}

I got a few input fields in there: city, skillLevel, province and category . 我在那里输入了几个字段: city, skillLevel, province and category When i submit the form i get a awfull url like this: 当我提交表格时,我得到一个像这样的网址:

http://localhost/vacatures?city=somehwhere&skillLevel=junior&province=Zeeland&category=django

but i want something like this: 但我想要这样的事情:

http://localhost/vacatures/somewhere/junior/Zeeland/django

How do i achieve this? 我该如何实现? I've tried giving at a route attribute and a action actribute, but that didnt work out. 我曾尝试给出一个route属性和一个action actribute,但这并没有解决。

Maybe this topic will help you - How To Pass GET Parameters To Laravel From With GET Method ? 也许这个主题对您帮助- 如何使用GET方法GET参数传递给Laravel?

There are 2 nice answers, which should suit to your problem. 有2个不错的答案,应该适合您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM