Fix relationship between Word and LexicalEntry
This commit is contained in:
parent
f24df2563a
commit
40f408115d
|
@ -27,6 +27,6 @@ class LexicalEntry extends Model
|
|||
*/
|
||||
public function words()
|
||||
{
|
||||
return $this->hasMany(Word::class, 'strongs_number');
|
||||
return $this->hasMany(Word::class,'strongs_number', 'id');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,8 +35,11 @@ class Word extends Model
|
|||
return $this->belongsTo(Word::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function lexicalEntry()
|
||||
{
|
||||
return $this->belongsTo(LexicalEntry::class, 'id', 'strongs_number');
|
||||
return $this->belongsTo(LexicalEntry::class, 'strongs_number', 'id');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue