4 years ago

Issues returning value from relationship

Posted 4 years ago by twg_

I'm having an issue with calling a field from a linked table.


public function type()
    $this->hasOne('App\DegreeType', 'id', 'degree_type');


<td>{{ $degree->type->title }}</td>

My degree_types table has the following: id, title, created_at, updated_at, deleted_at.

What am I doing wrong?

Please sign in or create an account to participate in this conversation.