0
When bringing the form for the user to fill, I need that, if the data already exists in the database, it brings me the form filled with the possibility of the user "edit", but always creating a new record and not changing the existing.
Note: Not the same as using {{old('campo')}}
because it’s only for one request error. Thanks for your help.
<label for="peso">Peso (Kg) : </label>
<input type="text" name="peso" class="form-control" v-model="peso"/>
<label for="altura">Altura (m) : </label>
<input type="text" name="altura" class="form-control" v-model="altura" v-mask="'#.##'"/>
<label for="peso">Idade: </label>
<input type="text" name="idade" class="form-control" v-model="idade"/>
<br/>
If it will be a new record, there is no
id
associate. If there is noid
associated, how will we know if the information is already in the database?– Woss
Weight, height and age information are associated with the user, by user id I would see if there is already data in the database.
– Guilherme Rigotti