dmitry.malys
2 years ago
218
4
Laravel

& a m p; replace or decode in Laravel 5.4

Posted 2 years ago by dmitry.malys

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'));
    }`

But it didn't work.

Some on know what im doing wrong?

Please sign in or create an account to participate in this conversation.