I don't think there's a way to repopulate both forms while keeping identical names.
You could probably change names to:
form1 -> contact[name], contact[email], contact[body]
form2 -> reservation[email], ...
And then change your controller, and validator if any, to use $request->input('contact')
instead of $request->all()
in ContactController, and $request->input('reservation')
in ReservationController.
Thanks that worked great. For the sake of completeness (and for anyone else using this), don't forget to update your rules to names like 'contact.name', 'contact.email' and so on.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community