Skip to content

Commit

Permalink
Merge pull request lazychaser#542 from doegel/nova-fix
Browse files Browse the repository at this point in the history
FIX: Issues with Laravel Novas reverse dependency resolving
  • Loading branch information
lazychaser authored Feb 11, 2022
2 parents bcfbcce + 427d428 commit 81f9ecf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/BaseRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,16 @@ protected function matchForModel(Model $model, EloquentCollection $results)

return $result;
}

/**
* Get the plain foreign key.
*
* @return mixed
*/
public function getForeignKeyName()
{
// Return a stub value for relation
// resolvers which need this function.
return NestedSet::PARENT_ID;
}
}

0 comments on commit 81f9ecf

Please sign in to comment.