Laravel形式方法获取url参数


Laravel form method get - url parameters

我在laravel中得到了一个带有Method='GET' 的表单

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

我得到了一些输入字段:city, skillLevel, province and category。当我提交表单时,我会得到一个完整的url,如下所示:

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

但我想要这样的东西:

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

我该如何做到这一点?我试过给at一个route属性和一个action actribute,但没有成功。

也许本主题会对您有所帮助-如何使用GET方法将GET参数传递给Laravel-From?

有两个不错的答案,应该适合你的问题。