Posts by Igor Nobrega • 1 point
2 posts
-
0
votes1
answer23
viewsA: Loop Laravel making only one Insert in the bank, when it should do several
I found the solution, I changed my method. for ($x = 1; $x <= $request->cont_qtdParcela; $x++){ Parcela::insert(['contrato_id' => $contrato->cont_id , 'num_parcela' => $x ,…
-
-1
votes1
answer23
viewsQ: Loop Laravel making only one Insert in the bank, when it should do several
I’m not getting enough inserts in the database with a loop. At the time of insert, he only makes one. public function store(Request $request){ $contrato = new Contrato(); $contrato->cont_aluno =…