Support the ongoing development of Laravel.io →
Requests Input Forms
Last updated 2 years ago.
0

You can not change the action url of the form while filling it (you can with Javascript but that would be verycomplicated).
Instead take the submitted parameters with Input::get('parametername').

Route::get('/search', ['as' => 'search', 'uses' => 'SearchController@search']);

SearchController

function search()//no parameters from route
{
$category = Input::get('category');
echo $category;
$term = Input::get('term');
echo $term;
}
0

Hello

No way javascript :p

finally i did a function red_search() that redirect to /search/{category}/{term}

public function red_search()
	{
		$url=Request::all();
		
		return redirect('search/'.$url['category'].'/'.$url['term']);
	}

thank you ;)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

NearRiv nearriv Joined 28 Mar 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.