Laravel form method get - url parameters

26,150

Maybe this topic will help you - How To Pass GET Parameters To Laravel From With GET Method ?

There are 2 nice answers, which should suit to your problem.

Share:
26,150
Kevinvhengst
Author by

Kevinvhengst

Updated on February 09, 2020

Comments

  • Kevinvhengst
    Kevinvhengst about 4 years

    I got a form in laravel with Method='GET'

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

    I got a few input fields in there: 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.

  • Kevinvhengst
    Kevinvhengst about 9 years
    Thanks! Did not come across this answer yet!