Skip to content

Custom filters on BelongsToMany throws BadMethodCallException  #45

Description

@dracon

"message": "Call to undefined method Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany::getQualifiedRelatedKeyName()", "exception": "BadMethodCallException", "file": "/var/www/bneapilocal/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php", "line": 50,

In EloquentBuilderTrait.php
In method joinRelatedModelIfExists
At line 299

Custom filters on BelongsToMany throws exception on the method call at line 299:
$relation->getQualifiedRelatedKeyName()
When I change it to:
$relation->getQualifiedRelatedPivotKeyName()

This works fine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions