0

... When I make add or remove on Request it doesn't make any thing, although it works in such other places . I'm using

$request->request->add(['item'=>value]);

and using

$request->request->remove(['item']);
  • Are you sure `$request` is really a Request ? what does `dd($request);` output – Mike Jan 21 '20 at 10:57
  • yes it is the regular Request class `Illuminate\Http\Request` but there a small issue on implementing it in laravel itself. larvel uses `Symfony\Component\HttpFoundation\Request`. `Symfony\Component\HttpFoundation\Request` uses a class that store request data `Symfony\Component\HttpFoundation\ParameterBag` the symphony request put its data into the "ParameterBag" all its data , then the laravel "Request" make override on it by adding the GET data separately so if you have both "GET" and "POST" data will be overridden – Abdullah Al_Nahhal Jan 23 '20 at 09:12

0 Answers0