Old() with array - Laravel

Asked

Viewed 165 times

0

Good, I’m trying to recover the value with old() but I can’t because of the variable $i. I have an input like this:

@for ($i = 0; $i < 10; $i++)
 <input type="text" name="tempos[]" 
 value="{{old('tempos'.$i,$valores[$i]->minutos)}}"/>
@endfor

Thank you

  • Would not be old('tempos.'.$i), with the point after tempos?

  • I tried it and it worked. Thank you

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.