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;
}
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 ;)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community