2015-02-08 31 views
1

我得到了一个laravel形式Method='GET'Laravel形式方法得到 - URL参数

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

我在那里的几个输入字段:city, skillLevel, province and category。 当我提交表单,我收到了awfull网址是这样的:

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

,但我想是这样的:

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

我如何实现这一目标?我试着给出一个路线属性和一个行动贡献,但是这并没有解决。

+2

恐怕就是html的工作原理。你可以看看http://stackoverflow.com/questions/5464481/clean-urls-for-search-query和http://matthewjamestaylor.com/blog/how-to-post-forms-to-clean-rewritten-网址他们都基本上是黑客,所以我猜测没有标准的方式去做这件事。 – 2015-02-08 16:35:47

+0

那么,如果我要坚持丑陋的网址,我怎么能使用一个路线,捕捉这个? – Kevinvhengst 2015-02-08 16:37:56

+0

默认情况下,虚拟机控制器不可用吗? – 2015-02-08 16:44:13

回答