I am using laravel and I am facing one problem, I have URL like this
Now I am creating middleware after matching the version the query parameter should remove. Below is the middleware code
public function handle($request, Closure $next)
{
$input = $request->all();
$request->replace($request->except(['version']));
return $next($request);
}
But it is not working to remove query parameters although working post data.