dimanche 20 octobre 2019

Eloquant ID & Foreign key

In my table Cous I a variable date_seance with 2 recordings.

enter image description here

In my table Retour, I have to retrieve the date_seance.

enter image description here

Except that, I always have the same value each time. Where is on 23/10/2019 ?

In my model Retour I have this:

public function retours()
    {
        return $this->hasManyThrough(
            'App\Retour',
            'App\Eleve',
            'fk_cours', 
            'fk_eleve',
            'id', 
            'id' 
        );
    }

In my Retour index.blade I have this:

 @foreach($retours as $retour)
 <tr>
    <td> </td>
    <td> </td>
    <td> </td>  
    <td> </td>  
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td> 

My problem is this line:

<td> </td>

I don't understand my problem.

I thank you in advance for your help.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire