forked from WycliffeAssociates/en_btr_backend
Fix some LexicalEntry relationship references
This commit is contained in:
parent
e41971a69c
commit
4e8c229b97
|
@ -55,10 +55,10 @@ class Schema extends SchemaProvider
|
||||||
public function getRelationships($resource, $isPrimary, array $includeRelationships)
|
public function getRelationships($resource, $isPrimary, array $includeRelationships)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'lexical-entry' => [
|
'lexical-entries' => [
|
||||||
self::SHOW_SELF => true,
|
self::SHOW_SELF => true,
|
||||||
self::SHOW_RELATED => true,
|
self::SHOW_RELATED => true,
|
||||||
self::SHOW_DATA => isset($includeRelationships['lexical-entry']),
|
self::SHOW_DATA => isset($includeRelationships['lexical-entries']),
|
||||||
self::DATA => function () use ($resource) {
|
self::DATA => function () use ($resource) {
|
||||||
return $resource->lexical_entry;
|
return $resource->lexical_entry;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ class Word extends Model
|
||||||
/**
|
/**
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||||
*/
|
*/
|
||||||
public function lexicalEntry()
|
public function lexicalEntries()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(LexicalEntry::class, 'strongs_number', 'id');
|
return $this->belongsTo(LexicalEntry::class, 'strongs_number', 'id');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue