The Has Many Through relationship description does not contain the otherKey parameter
igor-tv opened this issue · 1 comments
igor-tv commented
Has Many Through example looks like this:
public $hasManyThrough = [
'posts' => [
'Acme\Blog\Models\Post',
'key' => 'my_country_id',
'through' => 'Acme\Blog\Models\User',
'throughKey' => 'my_user_id'
],
];
This example does not work correctly for me when outputting to the backend lists. But it starts working correctly when I add the otherKey parameter. Maybe you need to add it to the example in documentation?
public $hasManyThrough = [
'posts' => [
'Acme\Blog\Models\Post',
'key' => 'my_country_id',
'otherKey' => 'other_id',
'through' => 'Acme\Blog\Models\User',
'throughKey' => 'my_user_id'
],
];
bennothommo commented
@igor-tv Please feel free to submit a PR to the docs with that addition, if you wish.