vendredi 1 octobre 2021

Laravel - Element displaying twice while looping inside a condition

This is the example while looping

despite having a condition and relation many too many it seems that the case

  @foreach (\App\ClientDocument::where('id_client', $clients->id)->get() as $item)    
                  @if (\App\Document::where('id',$item->id_document)->get())
                  <a class="img-fluid " href="" download="" alt="" name="download"  > Telecharger </a>
            
                  @endif  
               @endforeach


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire