Reputation: 1323
it is a newbie question. But i spend 3 hours to solve it with 0 result.
i want to convert this link:
http://127.0.0.1:8000/data?make%5B%5D=ACURA&model%5B%5D=LEGEND&score%5B%5D=6
in to this:
http://127.0.0.1:8000/data?make%5B%5D=ACURA&model%5B%5D=LEGEND&score%5B%5D=6
This is my controller:
public function index(Request $request)
{
$inputRAW = $request->getQueryString();
$inputDECODE = htmlspecialchars_decode($inputRAW);
$input = str_replace('&', '&', $inputDECODE);
return view('lots.browse', compact('input'));
}
Some on know what im doing wrong?
Upvotes: 0
Views: 215
Reputation: 415
In order to change query string you should redirect it.
Have a look here: https://laravel.com/docs/5.4/redirects
Upvotes: 1