My problem is as follows, I have a view where, based on a number of buildings, I display a number of inputs to load each building's data, this number of buildings I keep in the variable, $ number of buildings that I then intend to use with a for as follows in my view
@for($i = 0; $i < $numeroedificios ; $i++ )
<input type="text" title="Nombre de edificio" class="form-control " name="nombreedificio[]" id="nombreedificio[] " placeholder="Nombre de edificio" required />
<input type="number" title="Numero de aulas" class="form-control" min="1" max="32"
name="numeroaulas[]" id="numeroaulas[]" placeholder="Numero de Aulas" required />
<input type="text" title="Prefijo aula" class="form-control " name="prefijoaulas[]" onkeyup="myFunction()" id="prefijoaulas[]" placeholder="Prefijo de aulas" required />
Data that must arrive in an array to my controller this data I receive in an array in the following way
$edificios = array(
'nombreedificio' => $request->nombreedificio,
'numeroaulas' => $request->numeroaulas,
'prefijoaulas' => $request->prefijoaulas,
);
dd($edificios);
When executing a dd ($ buildings) I can observe the following
What I want is to be able to enter all the records entered based on the numbers of buildings, and be able to save them in an orderly way to send them to the view again so that the user can verify the data entered and save them. I appreciate your help