You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when using a blade component which includes an input, as an array field (like person.1.name, person.2.name). The way to set the field's value and retrieve the fields old value are not unified.
In this case, oldName is the value used to get the old()value in my form.
As you can see in this example, name points to the same value structure as oldName, but their notation is different since old()doesn't accept the name value.
What I would like to see is being able to use the name variable as a pointer to the old() value.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is about Laravel 7.
Currently, when using a blade component which includes an input, as an array field (like
person.1.name
,person.2.name
). The way to set the field's value and retrieve the fields old value are not unified.<x-dropdown-field name="services[{{$service->id}}][included]" :oldName="'services.'.$service->id.'.included'"/>
In this case, oldName is the value used to get the
old()
value in my form.As you can see in this example,
name
points to the same value structure asoldName
, but their notation is different sinceold()
doesn't accept the name value.What I would like to see is being able to use the
name
variable as a pointer to theold()
value.Beta Was this translation helpful? Give feedback.
All reactions