hi
consider you have multiple browser tabs. and you have one form on each tab. then you click submit button of all form in all tabs very fastly (submit all forms in each browser tab together).
and we redirect user in contorller with back()->withInput().
then when we redirect to back, we see inputs of some forms conflict and there is the data of some forms in other forms.
how can i fix this bug?
it is not reasonable. becasue a user (operator) opens multiple tab and prepare some form and after prepared completely, he saves all forms and then this problem will be occure.
So how would you suggest that the data is stored instead if not in the session? Remember that laravel has no way of knowing that you have 2 tabs open. I have a feeling that the developers of laravel wont see this as a bug :)
you want to edit title field in form in tab1 and tab2 and add suffix that there is in clipboard.
control+v in tab1 and save form1. Immediately control+v in tab2 and save form2.
then after get response in tab1 and tab2, If internet speed be slow, you can see the data of two forms are exactly similar!
because ->withInput() uses session.
I never do this before, so not sure what is result. But maybe you can test. I think it should works, as long for each tab there is only 1 product. In case you want also allow multiple tabs with the same product, you have to adjust MessageBag unique id. Via javascript there is a way to get the tab id, see https://stackoverflow.com/questions/11896160/any-way-to-identify-browser-tab-in-javascript
So you could for example store in cookie the tab id and attach to MessageBag.