mercredi 1 avril 2020

Trying to get property 'name' of non-object (View: /var/www/html/gandhisir_tests/resources/views/admin/institute/show_students.blade.php)

This is my Students model

      public function user() {
        return $this->belongsTo(Users::class);
         }

This is my blade file code

      @foreach($lists as $index => $list)
                      <tr>
                        <td>      

                      </tr>
                       @endforeach

This is my InstituteController Code

 public function students()
    {
      $students = Students::all();  
      return view('admin/institute/show_students')->with('lists',$students);
    }


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire