They arent the same.
http://127.0.0.1:8000/products?perPage=54&orderBy=asc&order=title
order=title, orderBy=asc
http://127.0.0.1:8000/products?order=asc&orderBy=title&perPage=54
order=asc, orderBy=title
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm trying to implement a perPage functionality to a site. I have different dropdown boxes where the user can choose the order, perPage and some other values. If he clicks submit i generate an url with the given values and redirect the user with location.href (Form not really possible since i'm using https://vuetifyjs.com/releases/0.15/ ).
If i redirect the user now to a js generated url like:
http://127.0.0.1:8000/products?perPage=54&orderBy=asc&order=title
i receive and 302 redirect.
But if I enter the same url manually in the address bar:
http://127.0.0.1:8000/products?order=asc&orderBy=title&perPage=54
it works.
dd() output called with js:
array:3 [▼
"perPage" => "54"
"orderBy" => "asc"
"order" => "title"
]
dd() output entered manually in address bar:
array:3 [▼
"order" => "asc"
"orderBy" => "title"
"perPage" => "54"
]
rule:
return [
'perPage' => 'nullable|numeric',
'orderBy' => ['nullable', Rule::in($this->orderBy)],
'order' => ['nullable', Rule::in($this->order)]
];
I also tried to remove/change the perPage key, but with no effect.
Why the heck is the js generated url not working but the manually one does?
It's driving me crazy. It looks exactly the same and it's working if entered manually :(
Please or to participate in this conversation.