我有两个实体user和address。因此,用户可以具有多个地址(oneTomany),并且每个用户与地址实体也具有primaryAddress(一对一)关系。如何设计这两个实体?
<form action="" method="POST" >
@csrf
<div class="form-group">
<label for="exampleInputEmail1">Mətn</label>
<input type="text" name="text" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" value="{{$header->name}}">
<small id="emailHelp" class="form-text text-muted"></small>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Şəkil</label>
<input type="file" name="imgName" class="form-control" id="exampleInputPassword1" value="
{{$header->imgName}}">
</div>
<div class="form-check">
</div>
<button type="submit" class="btn btn-primary">Dəyiş</button>